# p_rgh with chtMultiRegionFoam

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

March 4, 2014, 02:07
p_rgh with chtMultiRegionFoam
#1
New Member

ande
Join Date: Oct 2013
Posts: 18
Rep Power: 12
Hello,

I want do simulate the cooling prozess of a hot sphere (500K) in a cylindrical air-flow.(pictures) ModellEinzelkugel.pdf

Iam not sure which boundary conditions for p and p_rgh I should choose. I added the files for p and p_rgh.

The pressure p at the inlet is lower than at the outlet. Can anyone explain this pressure distribution? (pictures)

Andreas
Attached Images
 p_rgh.jpg (18.8 KB, 59 views) p.jpg (19.3 KB, 48 views)
Attached Files
 p.txt (1.4 KB, 46 views) p_rgh.txt (1.4 KB, 51 views)

March 4, 2014, 05:01
#2
Senior Member

Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
A few questions:
What is the boundary "fluidwall" and why is the type empty? Normally this means that you are doing a 2D simulation.

What is the temperature and density of the fluid behind (downstream of) the sphere? It's probably lower so the velocity becomes higher. Now I am not really sure what kind of pressure (total/static/...) OpenFOAM is saving. Perhaps the higher pressure is a result of the increased velocity at the outlet compared to the inlet?

Quote:
 Originally Posted by styx Hello, I want do simulate the cooling prozess of a hot sphere (500K) in a cylindrical air-flow.(pictures) Attachment 29065 Iam not sure which boundary conditions for p and p_rgh I should choose. I added the files for p and p_rgh. The pressure p at the inlet is lower than at the outlet. Can anyone explain this pressure distribution? (pictures) Thanks in advance Andreas

March 4, 2014, 06:11
#3
New Member

ande
Join Date: Oct 2013
Posts: 18
Rep Power: 12
Quote:
 Originally Posted by jherb A few questions: What is the boundary "fluidwall" and why is the type empty? Normally this means that you are doing a 2D simulation. What is the temperature and density of the fluid behind (downstream of) the sphere? It's probably lower so the velocity becomes higher. Now I am not really sure what kind of pressure (total/static/...) OpenFOAM is saving. Perhaps the higher pressure is a result of the increased velocity at the outlet compared to the inlet?

fluidwall is not the wall of the cylindrical channel. This is just an empty boundary which comes from snappyHexMesh. It is a real 3D Simulation. The wall of the channel has the name fluidWall_region0.

Here is a picture of the velocity:u.jpg

 March 4, 2014, 06:25 #4 Senior Member   Joachim Herb Join Date: Sep 2010 Posts: 650 Rep Power: 21 The velocities at the outlet do not look physically correct. Just an idea: Try the mean value boundary condition for the pressure outlet: http://www.cfd-online.com/Forums/ope...condition.html Or you have to extend the dimension of your cylinder much longer in the downstream direction so you get a homogeneous velocity distribution.

March 4, 2014, 06:50
#5
New Member

ande
Join Date: Oct 2013
Posts: 18
Rep Power: 12
Quote:
 Originally Posted by jherb The velocities at the outlet do not look physically correct. Just an idea: Try the mean value boundary condition for the pressure outlet: http://www.cfd-online.com/Forums/ope...condition.html Or you have to extend the dimension of your cylinder much longer in the downstream direction so you get a homogeneous velocity distribution.
I would prefer to try the "fixedMeanValue" boundary. I the thread from obove, the meanValue is 3.3. What does this Value say? Can I try a value of the same order?

 March 4, 2014, 07:11 #6 Senior Member   Joachim Herb Join Date: Sep 2010 Posts: 650 Rep Power: 21 Just replace the "fixedValue" boundary condition for outlet in p and p_rgh by fixedMeanValue. Add meanValue 100000 (and keep the value). (Of course you have to add the compiled library for the new boundary condition to your controlDict as described in the above referenced thread).

 March 4, 2014, 07:55 #7 New Member   ande Join Date: Oct 2013 Posts: 18 Rep Power: 12 The link in the thread about this topic does not open. Is there another source where I can get the library?

 March 4, 2014, 08:47 #8 Senior Member   Joachim Herb Join Date: Sep 2010 Posts: 650 Rep Power: 21 You could use the version in this message: http://www.cfd-online.com/Forums/ope...tml#post418371 or try my modifications: http://www.cfd-online.com/Forums/ope...tml#post477560

March 5, 2014, 02:30
#9
New Member

ande
Join Date: Oct 2013
Posts: 18
Rep Power: 12
Quote:
 Originally Posted by jherb You could use the version in this message: http://www.cfd-online.com/Forums/ope...tml#post418371 or try my modifications: http://www.cfd-online.com/Forums/ope...tml#post477560
Iam sorry to ask you again. I´m trying to install the library described in the first link. I´m not sure in which folder I have to copy the files. I is the first time I add any sources to my openfoam installation.

In the thread it is said, that the files can be compiled in the personal foam directory. Is this the OpenFOAM/ubuntu-2.2.1/run directory or the opt/openfoam221 directory?

March 5, 2014, 07:22
#10
Senior Member

Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
Actually you can unpack the archive in any directory you have write permission. I would recommend something like \$HOME/OpenFOAM/ubuntu-2.2.1/application. Then step into this directory and issue the command
Code:
`wmake libso`
(actually starting with OpenFOAM 2.2.2 wmake alone is enough). This should install a shared library in your directory \$FOAM_USER_LIBBIN. If you add the new library to your controlDict, like
Code:
`libs ( "libfixedMeanValue.so");`
OpenFOAM should find it automatically.

Quote:
 Originally Posted by styx Iam sorry to ask you again. I´m trying to install the library described in the first link. I´m not sure in which folder I have to copy the files. I is the first time I add any sources to my openfoam installation. In the thread it is said, that the files can be compiled in the personal foam directory. Is this the OpenFOAM/ubuntu-2.2.1/run directory or the opt/openfoam221 directory?

 March 5, 2014, 08:15 #11 New Member   ande Join Date: Oct 2013 Posts: 18 Rep Power: 12 Thank you very much for your reply. It was very helpful. The simulation is no running with "fixedMeanValue". I´m looking forward for the results.

March 5, 2014, 10:57
#12
New Member

ande
Join Date: Oct 2013
Posts: 18
Rep Power: 12
Quote:
 Originally Posted by jherb The velocities at the outlet do not look physically correct. Just an idea: Try the mean value boundary condition for the pressure outlet: http://www.cfd-online.com/Forums/ope...condition.html Or you have to extend the dimension of your cylinder much longer in the downstream direction so you get a homogeneous velocity distribution.

I have the first results of the simulation with fixedMeanValue BC for p and p_rgh. The pressure distribution is the same as you can see in the pictures from the first post.
The velocity field looks much better now: U-fixedMeanPressure.jpg

I also added the BC for the velocity. Maybe you can have a look at it. U.txt

 March 5, 2014, 11:14 #13 Senior Member   Joachim Herb Join Date: Sep 2010 Posts: 650 Rep Power: 21 I think the U boundary conditions are ok. Could you scale the velocities on the two pictures (of the old and new simulation) with the same range. Especially in the second image it looks like the velocity next to the sphere is the same as up- and downstream (which does not make sense).

March 5, 2014, 11:29
#14
New Member

ande
Join Date: Oct 2013
Posts: 18
Rep Power: 12
Quote:
 Originally Posted by jherb I think the U boundary conditions are ok. Could you scale the velocities on the two pictures (of the old and new simulation) with the same range. Especially in the second image it looks like the velocity next to the sphere is the same as up- and downstream (which does not make sense).
Here is the rescaled velocity field. Gravity is not activated in both cases.
U-fixedMeanPressure2.jpg

The overall velocity in this second picture is lower than in the old picture (old simulation) because I have reduced the massflow.

March 5, 2014, 16:53
#15
Senior Member

Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
The new picture looks ok. Do you have experimental data to compare with (e.g. the temperature distribution, heat transfer coefficients,...)?

Quote:
 Originally Posted by styx Here is the rescaled velocity field. Gravity is not activated in both cases. Attachment 29147 The overall velocity in this second picture is lower than in the old picture (old simulation) because I have reduced the massflow.

 March 6, 2014, 01:28 #16 New Member   ande Join Date: Oct 2013 Posts: 18 Rep Power: 12 For this model I have no experimental data to compare with. I want to compare the results with ansys cfx. Maybe there will be a experiment with a real pebble bed to compare with in a few months.