boundaryField vs. internalField
Hi there,
maybe this sounds a bit like a stupid question, but the answer is not clear to me: Can you tell me, what the 'boundaryField', like it is returned for example from a volScalarField by Code:
volScalarField.boundaryField(); This makes a difference! Thanks in advance, Greetings Sebastian |
I'm pretty sure it's the patch value. The near-patch cell values can be read by patchInternalField I think.
|
Problem solved!!!
Thanks Anton!
Greetings Sebastian |
As suggested above through this construct you can access patch values. You can also reinforce it with an id in a following way
Code:
q.boundaryField()[i] Another example is: Code:
sum( q.boundaryField()[i] * mesh.Sf().boundaryField()[i] ); Hope that helps. |
Along the same line of questioning, how can I access the value at a corner of a 2D mesh?
|
I don't think you can, because values are not stored on vertices. You will have to manually find the corner cell and then interpolate the appropriate face values to get something at the corner.
|
Hi Ben,
I don't really know a correct answer for your question, but I doubt that there is a method in volVectorField or volScalarField that returns such a "corner" value. Maybe you can create the value with some "if"-construct, because such a corner cell would be defined as "a cell that has two different patches on two of her faces". I can't tell a proper implementation, but maybe that's something you can start from! But as Anton already mentioned, you will have to separate between cell-centre-values and face-centre values. Hope that helps, Greetings Sebastian |
Quote:
But, how can I get hold of Qr? I am assuming it is a property of the fvDOM object. I'm not sure how to get hold of it in my code. Thank you, Mirko |
Quote:
I have no experience with radiation models in OpenFOAM. Also, I am not sure what do you mean by patch value. Do you want to use a value for each face on the patch or just some sort of integral? In the latter case I believe that the code you're looking for Code:
dimensionedScalar result = |
Quote:
Thanks, Mirko |
Right, now I see your problem and I am afraid can't claim any competence in OpenFOAM radiation models.
Perhaps you could look for some hints in /$FOAMSRC/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField. C /$FOAMSRC/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C Both of these codes are executing Qr and using fvDOM. Let me know if you find an answer. |
All times are GMT -4. The time now is 05:59. |