CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Energy based steady state solver.

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 24, 2011, 23:39
Question Energy based steady state solver.
  #1
Member
 
Ammar Tareen
Join Date: Jan 2011
Location: Boston University
Posts: 61
Rep Power: 15
atareen64 is on a distinguished road
Hello world!

I was using rhoSimpleFoam to simulate fluid (air) through a rectangular tube: inlet on one side and outlet on the other side, higher pressure on the inlet and lower pressure on the outlet. After running rhoSimpleFoam, my velocity, pressure and temperature profile look great!

The problem however is with the magnitude of U and Pressure: I am getting velocities of 1000+ m/s and pressures of 65 thousand pascals, clearly non physical results for my simple geometry (pressure at boundary conditions isn't high enough to reach these velocities).

The problem is with the thermoPhysicalProperties dictionary, the default thermo package for rhoSimpleFoam for air was

thermoType hPsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>>;

mixture air 1 28.966 1006.43 1.41e5 17.894e-06 0.720;

This works, the profiles look right but the numbers are completely are incorrect.

So I changed the rhoSimpleFoam solver so it would be able to use the following package

thermoType ePsiThermo<pureMixture<constTransport<specieThermo <eConstThermo<perfectGas>>>>>;

mixture air 1 28.9 717.5 10 1.82e-05 0.73;

The solver compiled successfully but now it blows up after 3 iterations.

ANYBODY PLEASE HELP:

how can I use rhoSimpleFoam to simulate air without getting crazy numbers OR
why does replacing enthalpy with energy in rhoSimpleFoam make it unstable? How can I fix this.

Thank you so much for reading this or trying to help!

~Ammar.
atareen64 is offline   Reply With Quote

Old   April 25, 2011, 13:04
Unhappy Help!
  #2
Member
 
Ammar Tareen
Join Date: Jan 2011
Location: Boston University
Posts: 61
Rep Power: 15
atareen64 is on a distinguished road
I am attaching my test case, which is set up to be run with 'rhoSimpleFoam'. Like I said I am getting unusual numbers for U and P. With a little bit of research, I found out that chagning the relaxation factors in the fvSolution file seem to affect the results quite a lot. I keep changing them and getting different results with no way of knowing what values are correct. Can somebody please run this case and suggest what the relaxation factors should be? or point out any other mistakes I am making?

Thank you!
~Ammar.
Attached Files
File Type: zip 0.zip (2.3 KB, 10 views)
File Type: zip constant.zip (2.7 KB, 10 views)
File Type: zip system.zip (3.2 KB, 14 views)
atareen64 is offline   Reply With Quote

Old   April 26, 2011, 12:02
Default Still having trouble...
  #3
Member
 
Ammar Tareen
Join Date: Jan 2011
Location: Boston University
Posts: 61
Rep Power: 15
atareen64 is on a distinguished road
I'm still having a lot of trouble with rhoSimpleFoam...
really any help would be good!
atareen64 is offline   Reply With Quote

Old   May 3, 2011, 16:28
Default
  #4
New Member
 
Ricardo Flatschart
Join Date: Apr 2010
Posts: 12
Rep Power: 15
rflats is on a distinguished road
Ammar, try changing the relaxation factors to:

p 0.2;
rho 0.2;
U 0.8;
h 0.8;

Regards,
Ricardo
rflats is offline   Reply With Quote

Old   May 3, 2011, 16:37
Default
  #5
Member
 
Ammar Tareen
Join Date: Jan 2011
Location: Boston University
Posts: 61
Rep Power: 15
atareen64 is on a distinguished road
Ricardo, just tried these values: the solution blew up after 17 iterations.

Also my goal was to run the rhoSimpleFoam solver on a laval (convergent-divergent) nozzle. My nozzle has approximate dimensions of 20 mm by 4 mm by 4 mm, and it has roughly 100,000 mesh cells. Also I noticed my program reaches a few thousand iterations if set the under-relaxation factors to really small values like 0.005, but still the results look unphysical: I get negative pressures!

I am totally confused about why this is happening. I'll go through the boundary conditions once again and perhaps post the case here so you can look at it may be?

Thanks for helping out!
regards,
~Ammar.
atareen64 is offline   Reply With Quote

Old   May 3, 2011, 17:05
Default
  #6
New Member
 
Ricardo Flatschart
Join Date: Apr 2010
Posts: 12
Rep Power: 15
rflats is on a distinguished road
What OF version are you using? With 1.6-ext these parameters where ok.

If you are using 1.7, try to change the linear solver for h as below:

h
{
/*
solver PBiCG;
preconditioner DILU;
tolerance 1e-10;
relTol 0.1;
*/
solver smoothSolver;
smoother DILUGaussSeidel;
nSweeps 2;
tolerance 1e-10;
relTol 0.01;
}


Also, modify the relaxation parameters to:

p 0.2;
rho 0.2;
U 0.8;
h 0.6;


Good luck!
rflats is offline   Reply With Quote

Old   May 6, 2011, 12:21
Default
  #7
Member
 
Ammar Tareen
Join Date: Jan 2011
Location: Boston University
Posts: 61
Rep Power: 15
atareen64 is on a distinguished road
I am using OF 1.7.1. The simulation works now: on a whim I set my under-relaxation factors much to small, something like ~ 1e-05. The solution converged and I got good results that I could compare to results that I got from another software.

Thanks for the help though!
~Ammar
atareen64 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressure based and Density based Solver Xobile Main CFD Forum 39 August 19, 2020 07:04
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
multiphase solver for steady state problems lionlove0903 OpenFOAM 0 January 5, 2011 08:41
Steady State 2 phase problem fivos FLUENT 0 April 27, 2009 17:34
Mass Diffusion: Transient and Steady State BC rval CFX 3 November 19, 2008 01:52


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