|July 15, 2013, 15:25||
How to evaluate a surfaceScalarField face by face?
Join Date: Jul 2009
Location: LanZhou China
Posts: 10Rep Power: 9
rhoPhi is defined as
and it is updated after alphaEqn solved.
Now I want to create a new surfaceScalarField rhoPhi2 ,which is a function of rhoPhi, so I define
and evaluate rhoPhi2 face by face :
forAll (rhoPhi2 , facei)
rhoPhi2[facei] = rhoPhi[facei];
but it doesn't work as same as
rhoPhi2 = rhoPhi;
Is there any mistake in my testing code? And How to evaluate a surfaceScalarField face by face?
|July 15, 2013, 18:03||
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370Rep Power: 15
Have a look at what operator= does for fields in GeometricField.C
You need to also loop over boundaries. I would question why you need to loop though.
Laurence R. McGlashan :: Website
|Thread||Thread Starter||Forum||Replies||Last Post|
|Import netgen mesh to OpenFOAM||hsieh||Open Source Meshers: Gmsh, Netgen, CGNS, ...||32||September 13, 2011 05:50|
|BlockMeshmergePatchPairs||hjasak||OpenFOAM Native Meshers: blockMesh||11||August 15, 2008 07:36|
|fluent add additional zones for the mesh file||SSL||FLUENT||2||January 26, 2008 12:55|
|Axisymmetrical mesh||Rasmus Gjesing (Gjesing)||OpenFOAM Native Meshers: blockMesh||10||April 2, 2007 14:00|
|Trimmed cell and embedded refinement mesh conversion issues||michele||OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...||2||July 15, 2005 04:15|