CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Other] A patch with two types (https://www.cfd-online.com/Forums/openfoam-meshing/222188-patch-two-types.html)

celestial November 14, 2019 12:33

A patch with two types
 
I am referring to the boundary file residing inside folder constant/polyMesh.

Perhaps these are stupid questions.

1) Can a type be both wall and cyclic ? I am thinking of the periodic set-up of blades in a compressor.

2) I have a patch of type wall since I will solve Navier Stokes equations near the interface between air and a solid. However, this interface also separates two different meshes and the same patch also needs to be of type mappedPatch because I use swak4Foam's groovyBC for an electric field boundary condition. Unfortunately, OF complains that the patch cannot be of both types.What can be done ?

Have a great day,
Marc

celestial November 18, 2019 22:47

OK, fine. If nobody knows, I'll stick with openFoam's


patchToPatchInterpolation.faceInterpolate(othersid epatch.patchInternalField());

use the above for your patch

and in a file

variableValueYourFieldVarFvPatchScalarField.C

the following excerpt:

void variableValueYourFieldVarFvPatchScalarField::updat eCoeffs()
{
if (updated())
{
return;
}


operator==(*this);


fixedValueFvPatchScalarField::updateCoeffs();
}


which will be called if in dictionary 0/YourFieldVar, your patch has type

variableValueYourFieldVar


This way, I can keep type wall for the your patch in the boundary file.


All times are GMT -4. The time now is 15:57.