CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   mapped boundary condition in multi-region solvers (https://www.cfd-online.com/Forums/openfoam-programming-development/214794-mapped-boundary-condition-multi-region-solvers.html)

benedip February 13, 2019 07:09

mapped boundary condition in multi-region solvers
 
Hi,


I’m trying to exchange information between two boundaries (mappedWall types) in a multi-region approach. I built separately the two regions (domain1 and domain2) by means of two blockMeshDicts. A similar approach can be found in the following tutorial case:


OpenFOAM-v1812/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger


I transferred the velocity field U from patch1 (mappedWall at the outlet of domain1) to patch2 (mappedWall at the inlet of domain2). I achieved it easily this by mapping velocity on patch1 and by fixing it on patch2 in a similar way to the mappedVelocityFluxFixedValue B.C. So B.C. ends like:

Code:

  operator==(patch1UField);
 
fixedValueFvPatchField<vector>::updateCoeffs();

Thus, I obtained patch1UField = patch2UField. So far no problems.


Now, If I look at the velocity field just a little bit far from patch2 (in domain2), I find completely different values from the ones I fix (patch1UField). It’s like if my value didn’t come out from patch2.


Finally I can obtain the expected values at the neighboring patch cells (patch().faceCells()) by applying this B.C. (by fixing the patch values and the internal cells values), as follows:

Code:

  operator==(patch1UField);
 
Field<vector>& intFld = const_cast<Field<vector>&>(this->primitiveField());
UIndirectList<vector>(intFld, this->patch().faceCells()) = patch1UField;

 
fixedValueFvPatchField<vector>::updateCoeffs();

Does anybody know how to fix this problem?
I just want to fix the velocity on the patch without pushing internal cells values.
Thanks you


Best regards,
Benedetto
p { margin-bottom: 0.1in; line-height: 120%; }a:link { } p { margin-bottom: 0.1in; line-height: 120%; }a:link { }


All times are GMT -4. The time now is 06:53.