|
[Sponsors] |
January 14, 2011, 08:23 |
boundaryField vs. internalField
|
#1 |
Member
Sebastian Lang
Join Date: Aug 2009
Posts: 47
Rep Power: 17 |
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 |
|
January 14, 2011, 08:42 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
I'm pretty sure it's the patch value. The near-patch cell values can be read by patchInternalField I think.
|
|
January 14, 2011, 09:50 |
Problem solved!!!
|
#3 |
Member
Sebastian Lang
Join Date: Aug 2009
Posts: 47
Rep Power: 17 |
Thanks Anton!
Greetings Sebastian |
|
January 14, 2011, 10:45 |
|
#4 |
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22 |
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. Last edited by AlmostSurelyRob; January 14, 2011 at 12:38. |
|
January 14, 2011, 11:53 |
|
#5 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19 |
Along the same line of questioning, how can I access the value at a corner of a 2D mesh?
|
|
January 17, 2011, 05:45 |
|
#6 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
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.
|
|
January 17, 2011, 09:13 |
|
#7 |
Member
Sebastian Lang
Join Date: Aug 2009
Posts: 47
Rep Power: 17 |
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 |
|
January 24, 2011, 16:25 |
|
#8 | |
Senior Member
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 17 |
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 |
||
January 24, 2011, 16:48 |
|
#9 | |
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22 |
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 = sum(fvDOMInstance.Qr().boudaryField()[patchIndex] * mesh.Sf().boundaryField()[patchIndex]) |
||
January 24, 2011, 16:53 |
|
#10 | |
Senior Member
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 17 |
Quote:
Thanks, Mirko |
||
January 24, 2011, 17:43 |
|
#11 |
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22 |
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. |
|
Tags |
boundary field, boundary patch |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
transsonic nozzle with rhoSimpleFoam | Unseen | OpenFOAM Running, Solving & CFD | 8 | July 1, 2022 07:54 |
boundary conditions for simpleFoam calculation | foam_noob | OpenFOAM Running, Solving & CFD | 8 | July 1, 2015 09:07 |
Problem with internalField | mecbe2002 | OpenFOAM | 1 | April 24, 2010 11:57 |
buoyantSimpleRadiationFoam | msarkar | OpenFOAM | 0 | February 15, 2010 07:22 |
pipe flow with heat transfer | Fabian | OpenFOAM | 2 | December 12, 2009 05:53 |