# Mapped boundary condition mass flow rate behavior

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 4, 2020, 11:05 Mapped boundary condition mass flow rate behavior #1 Member   Join Date: Mar 2019 Posts: 81 Rep Power: 6 Dear Foamers, I am working on a case where I have to use a smaller geometry by achieving fully developed condition at the inlet (due to its complexity simulating a bigger geometry takes way too long)... To do so, I imposed the following boundary condition on U: Code: ``` outlet { type zeroGradient; value uniform (0 0 0); } inlet { type mapped; interpolationScheme cell; value uniform (0 0 -0.4021); setAverage false; }``` My intention is to achieve 1.65 kg/s of mass flow rate. My calculation shows it is equivalent to 0.4021 m/s. So I conducted the simulations and the mass flow rate is changing in the range 3 to 4 kg/s (!) Here is my main question: So I made a change and imposed "setAverage" as follows: Code: ``` outlet { type zeroGradient; value uniform (0 0 0); } inlet { type mapped; interpolationScheme cell; value uniform (0 0 -0.4021); setAverage true; average (0 0 -0.4021); }``` Now what I see in the console is that the mass flow rate goes from roughly 1.65 to roughly -1.65 kg/s successively. So for even iterations it is positive while for odd iterations it is negative. Any ideas guys? Please help. Cheers, MJ

 September 18, 2020, 03:52 #2 New Member   Ran Yi Join Date: May 2019 Posts: 8 Rep Power: 5 Hi MJ, 1. What is your inlet setting in polyMesh/boundary? 2. What does your geometry look like? I noticed the velocity in Z-direction is negative. BTW, have you solved this issue? Best, Ran

November 5, 2020, 11:32
#3
Member

Join Date: Mar 2019
Posts: 81
Rep Power: 6
Quote:
 Originally Posted by lizzy Hi MJ, 1. What is your inlet setting in polyMesh/boundary? 2. What does your geometry look like? I noticed the velocity in Z-direction is negative. BTW, have you solved this issue? Best, Ran

Hi Ran,

Thanks a lot for the reply and please accept my apologies for responding rather late...

1. The inlet boundary type is "patch"
2. It is a vertical geometry (in z-direction) where the fluid enters the domain from the bottom. Unfortunately I cannot share the geometry

I really appreciate your thoughts on this.

Regards,
MJ

 November 5, 2020, 12:35 #4 Senior Member   Adhiraj Join Date: Sep 2010 Location: Maryland, United States Posts: 185 Rep Power: 14 When I use this boundary condition I have to set the inlet boundary type to mappedPatch. This is in OpenFOAM 2.3.1. Here is an example from my constant/polyMesh/boundary file: Code: ```inAir { type mappedPatch; inGroups 1(mappedPatch); nFaces 16000; startFace 16759500; sampleMode nearestCell; sampleRegion region0; samplePatch none; offsetMode uniform; offset (0 0 0.04); }```

November 5, 2020, 14:57
#5
Member

Join Date: Mar 2019
Posts: 81
Rep Power: 6
Quote:
 Originally Posted by adhiraj When I use this boundary condition I have to set the inlet boundary type to mappedPatch. This is in OpenFOAM 2.3.1. Here is an example from my constant/polyMesh/boundary file: Code: ```inAir { type mappedPatch; inGroups 1(mappedPatch); nFaces 16000; startFace 16759500; sampleMode nearestCell; sampleRegion region0; samplePatch none; offsetMode uniform; offset (0 0 0.04); }```

Thank you very much for your prompt response.

I tried this with OpenFOAM 1812 and (unfoirtunately) "mappedPatch" is not recognized as a valid boundary condition:

Code:
```--> FOAM FATAL IO ERROR:
Unknown patchField type mappedPatch for patch type mappedPatch```
Regards,
MJ

 Tags chtmultiregionsimplefoam, mapped, mass flow rate, openfoam 1812