# simpleFoam - flow around a cube

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

 July 26, 2010, 11:25 simpleFoam - flow around a cube #1 New Member   Benni Join Date: May 2010 Posts: 12 Rep Power: 7 Hello, I try to simulate the flow around a cube in a 3D-channel with simpleFoam for incompessible flow, steady state. set up: inlet and outlet: cyclic front and back of the channel: symmetryPlane top and bottom of the channel: wall with increasing iterations the streamwise velocity decreases. because of this the massflow is decreasing, too, I think (inkompressible steady state flow)?!? How can I implement a constant mass flow in simpleFoam. Thanks Benni

 July 27, 2010, 02:27 simpleFoam - flow around a cube #2 Senior Member     ata kamyabi Join Date: Aug 2009 Location: Kerman Posts: 322 Rep Power: 8 Hi Benni Your problem is ill conditioned mathematically (has no unique solution in steady state). I think you can use a velocity inlet boundary condition and a value of pressure at outlet. Good luck Best regards Ata

 July 27, 2010, 02:33 simpleFoam - flow around a cube #3 Senior Member     ata kamyabi Join Date: Aug 2009 Location: Kerman Posts: 322 Rep Power: 8 Hi Benni Your problem is ill conditioned mathematically (has no unique solution in steady state). I think you can use a velocity inlet boundary condition and a value of pressure at outlet. Good luck Best regards Ata

 July 27, 2010, 03:09 #4 New Member   Benni Join Date: May 2010 Posts: 12 Rep Power: 7 Hi Ata, thanks for your answer. But I need cyclic inlet outlet boundary conditions, so I can simulate an array of cubes. For only one cube I tried velocity inlet BC and a pressure BC at the outlet. It works better. But I`m interested in a constant mass flow for simple foam?! Thanks Benni

 July 27, 2010, 03:49 #5 Senior Member   Stefan Herbert Join Date: Dec 2009 Location: Darmstadt, Germany Posts: 129 Rep Power: 8 Hi Benni, I think what Ata wanted to say is that you must not use cyclic boundary conditions in your case. Just imagine what will happen to your pressure. When you force it to be equal on inlet and outlet, you suppress pressure loss. But without pressure loss, there can be no flow! Two ways to solve it: Modify your solve to handle pressure gradient explicitly to enable the use of cyclic boundaries (already discussed here) Use directMapped BC for velocity (you can set a fixed average value here to fix mass flux) and for turbulence properties at inlet and zeroGradient at outlet, but use zeroGradient for pressure on both sides. It can be solved with unmodified simpleFoam. I've tested both ways, producing nearly the same results for a similar problem. Regards, Stefan

 July 27, 2010, 05:22 #6 New Member   Benni Join Date: May 2010 Posts: 12 Rep Power: 7 Hi Stefan, thanks a lot. now I unterstand the problem. I will try it directly best regards Benni

 July 28, 2010, 06:54 #8 Member   Arina Join Date: Oct 2009 Location: Belarus Posts: 76 Rep Power: 7 Hi everyone, I'm trying to simulate a turbulent flow around the cube. I use a simpleFoam, but have a strange results: stream lines look like laminar flow. But it is impossible, because inlet velocity is 15 m/s. How can it be?

 July 28, 2010, 07:00 Re number #9 Senior Member     ata kamyabi Join Date: Aug 2009 Location: Kerman Posts: 322 Rep Power: 8 Hi Arina As you know laminar or turbulent flow is charaterized by Re number. So, how much is your Re number? If you are sure that your case is turbulent please explain more about your case, solver, turbulence model and boundary conditions. Good luck Best regards Ata

July 28, 2010, 08:07
#10
Member

Arina
Join Date: Oct 2009
Location: Belarus
Posts: 76
Rep Power: 7
Quote:
 Originally Posted by ata Hi Arina As you know laminar or turbulent flow is charaterized by Re number. So, how much is your Re number? If you are sure that your case is turbulent please explain more about your case, solver, turbulence model and boundary conditions. Ata
Hi, Ata
My Re is about 5 000. I use solver simpleFoam-ras,
Boundary conditions are:
inlet - fixedvalue of all parameters,
box - fixedvalue of velocity and pressure,
and walls of chanel - zerogradient

 July 28, 2010, 08:43 simpleFoam - flow around a cube #11 Senior Member     ata kamyabi Join Date: Aug 2009 Location: Kerman Posts: 322 Rep Power: 8 Hi Arina Would you please upload some pictures from your geometry and mesh and your setup files? How much are your residuals? Good luck Best regards Ata

July 28, 2010, 08:55
#12
Member

Arina
Join Date: Oct 2009
Location: Belarus
Posts: 76
Rep Power: 7
Quote:
 Originally Posted by ata Hi Arina Would you please upload some pictures from your geometry and mesh and your setup files? How much are your residuals? Good luck Best regards Ata
Em... What is setup files?

 July 29, 2010, 01:14 simpleFoam - flow around a cube #13 Senior Member     ata kamyabi Join Date: Aug 2009 Location: Kerman Posts: 322 Rep Power: 8 Hi Arina I mean "0", "system" and "constant" files. Is your mesh a 3D one? If it is, it seems that in Y direction you have not enough cells. Would you please upload some pictures from your "strange results"? And how much are your residuals? Best regards Good luck Ata

July 29, 2010, 04:54
#14
Member

Arina
Join Date: Oct 2009
Location: Belarus
Posts: 76
Rep Power: 7
Quote:
 Originally Posted by ata Hi Arina I mean "0", "system" and "constant" files. Is your mesh a 3D one? If it is, it seems that in Y direction you have not enough cells. Would you please upload some pictures from your "strange results"? And how much are your residuals? Best regards Good luck Ata
Hi Ata
My mesh is a 3D. Why do you think that in Y dir. I haven't enought cells?
Result: you can see, that I have a nonseparated flow

Here are 0,system,constant

Last edited by Akuji; July 29, 2010 at 05:21.

 July 29, 2010, 06:03 #15 Senior Member   Stefan Herbert Join Date: Dec 2009 Location: Darmstadt, Germany Posts: 129 Rep Power: 8 Hi Benni, for your first problem you can try two things:Add underrelaxation for gradP just like Code: `gradP += gragPplus` Increase viskosity and decrease it step by step For the second problem I've to say that I didn't work with 1.7.0 yet, but the problem has to be inside BC's of k or epsilon (because reading of U works). Regards, Stefan

 July 29, 2010, 13:54 simpleFoam - flow around a cube #16 Senior Member     ata kamyabi Join Date: Aug 2009 Location: Kerman Posts: 322 Rep Power: 8 Hi Arina I think that cube affects boundary conditions in Y direction if this boundaries are near the cube. So, you can not assign a fixed value to these boundaries. I can't download your files. Would you please upload them in an other place such as forshared? In my opinion from your figure it is not clear that flow does not separated. Good luck Best regards Ata

 July 31, 2010, 15:27 #17 Member   Arina Join Date: Oct 2009 Location: Belarus Posts: 76 Rep Power: 7 Hi ata Thanks a lot, I found problem and solved it Last edited by Akuji; August 3, 2010 at 03:19.

 August 3, 2010, 03:50 #18 New Member   Benni Join Date: May 2010 Posts: 12 Rep Power: 7 Hi Stefan, I already added underelaxation for grad p. Have still problems. how do I have to set the BC for k and epsilon when I use directMapped. if k (or epsilon) is not fixedValue I get the failure message (see above). Regards Benni

August 4, 2010, 02:07
#19
Senior Member

ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 322
Rep Power: 8
Quote:
 Originally Posted by Akuji Hi ata Thanks a lot, I found problem and solved it
Hi Arina
I am very happy. Would you please tell me how it solved?
Best regards
Good luck

Ata

August 4, 2010, 12:35
#20
Member

Arina
Join Date: Oct 2009
Location: Belarus
Posts: 76
Rep Power: 7
Quote:
 Originally Posted by ata Hi Arina I am very happy. Would you please tell me how it solved? Best regards Good luck Ata
Well, I;m not sure that it is solved right, but I hope
About boundary condition: at inlet I have fixed value, at box and bottom of
canal I have velocity = 0 and fixed value of pressure (as I remember). At another region I put zero gradient.

So, at result I saw a turbulence whirlwind after box. That is what I want to see)

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post CD adapco Group Marketing CD-adapco 3 June 21, 2011 08:33 belinda OpenFOAM Running, Solving & CFD 0 November 2, 2009 04:57 yongshenglian OpenFOAM Running, Solving & CFD 0 October 29, 2008 16:28 pxyz Main CFD Forum 37 July 7, 2006 08:42 gzink OpenFOAM Running, Solving & CFD 0 June 9, 2006 16:52

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