|July 5, 2012, 12:42||
How to define a field on a patch
Greetings, dear colleagues!
I have a case with 2 meshes (say, "a" and "b"). And I need to implement a boundary condition (for the field u) like:
grad (u_a) = const*(u_a - u_b)
i.e. boundary gradient for the field u on the "a"-mesh side is proportional to the difference between the values of the u field on the "a"-"b" interface.
Now the question: is it possible to define a field on the patch?
When I do patch to patch interpolation I obtain a scalar field which groovyBC doesn't recognize (because it is not associated with specific patch). So I think I have to define a field on a specific patch. But how to do it? Or is there any other ideas how to implement desired BC?
Thanks in advance.
Best regards, Aleksey.
|July 9, 2012, 11:23||
Join Date: Mar 2009
Location: Darmstadt, Germany
Blog Entries: 5Rep Power: 12
try this to get an access to a boundary field:
fvPatchField<Type>& someFieldBuondaryField = someField.boundaryField()[patchI];
Be careful to use scalar, vector or tensor instead of Type, depending on the GeometricField<Type, ...> that you are dealing with. There are also some typedefs for the boundary patch fields like fvPatchScalarField I think....
|field, interpolation, patch|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Moving mesh||Niklas Wikstrom (Wikstrom)||OpenFOAM Running, Solving & CFD||122||June 15, 2014 06:20|
|StarToFoam error||Kart||OpenFOAM Meshing & Mesh Conversion||1||February 4, 2010 05:38|
|Missing math.h header||Travis||FLUENT||4||January 15, 2009 12:48|
|Free surface boudary conditions with SOLA-VOF||Fan||Main CFD Forum||10||September 9, 2006 12:24|
|Multicomponent fluid||Andrea||CFX||2||October 11, 2004 05:12|