|
[Sponsors] |
July 5, 2012, 13:42 |
How to define a field on a patch
|
#1 |
Member
|
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, 12:23 |
|
#2 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Hi Aleksey,
try this to get an access to a boundary field: Code:
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.... Tomislav |
|
Tags |
field, interpolation, patch |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
[Other] 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 13:24 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |