CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   rhoSimpleFoam - test case (http://www.cfd-online.com/Forums/openfoam-solving/87815-rhosimplefoam-test-case.html)

atareen64 April 29, 2011 12:20

rhoSimpleFoam - test case
 
Hello Everyone!

I posted this question earlier but got no replies, so I am posting this again in hopes of getting some help or insights. I have a rectangular pipe, with an inlet on one side and an outlet on the other side, higher pressure on the inlet and lower pressure on the outlet, so the fluid should flow from the inlet to the outlet.

The solver I wanna use is rhoSimpleFoam. I got some really good results with sonicFoam but I want to use a steady-state solver. Right now I am getting some reasonable profiles but the solution diverges soon, chiefly because I think I am not setting up the relaxation factors in fvSolution correctly.

Kindly look at my case and tell me what I could be possibly doing wrong. This is a test case and should be very easy to figure out (ironically). Please please help.

Case file
https://rapidshare.com/files/4597932...SimpleFoam.zip

Regards,
~Ammar.

niklas April 29, 2011 13:22

Rename your inlet to inlet and outlet to outlet and I hope you will notice one mistake yourself.
This will be noticable once you turn on turbulence though.

The main problem is the outlet bc for temperature.
set it to zeroGradient.
you cant have fixedValue temperature on both inlet and outlet.

atareen64 April 29, 2011 13:27

Thanks Niklas, doing it right now.

atareen64 April 29, 2011 14:15

Thank you Niklas, the results look a lot a lot better now.

Quick question: why can't I specify T at both the inlet and outlet? does that over-constrain the problem?

Also I changed the inlet and outlet names to inlet and outlet. The only thing I noticed was that my 'k' outlet condition seemed suspicious. The simulation still ran but I started getting 'nan' after a while. Could you give me a hint as to what I might be doing wrong in the turbulent case?

If not I'll look for other boundary conditions. Thanks A LOT for you're help!

regards,
Ammar.

niklas April 29, 2011 16:16

Quote:

Originally Posted by atareen64 (Post 305636)
Thank you Niklas, the results look a lot a lot better now.

Quick question: why can't I specify T at both the inlet and outlet? does that over-constrain the problem?

yes.

Quote:

Originally Posted by atareen64 (Post 305636)
Also I changed the inlet and outlet names to inlet and outlet. The only thing I noticed was that my 'k' outlet condition seemed suspicious. The simulation still ran but I started getting 'nan' after a while. Could you give me a hint as to what I might be doing wrong in the turbulent case?

you have the inlet bc on outlet and vice versa. just switch them around (on k and epsilon)

atareen64 May 1, 2011 17:17

Niklas,

Thank you so much for your help. I see the mistakes I was making and I have corrected them. I really appreciate your help! One last question:

In my laminar case, I set the end time to be 3000. However at 3000, the velocity and pressure profiles look really bizarre, however at around t = 1000, the profiles look very good and comparable to a simulation carried in solidWorks. I find this very strange and can't seem to think why this is happening. Should I just let it run for much longer? Do you have any ideas why this might me happening?

Thanks again for your help!
warm regards,
~Ammar.


All times are GMT -4. The time now is 18:12.