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

Compressible steady state solution divergence

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 29, 2015, 01:41
Default Compressible steady state solution divergence
  #1
New Member
 
Nihar
Join Date: Oct 2014
Posts: 8
Rep Power: 12
Nero_CMU is on a distinguished road
Hi everyone

I am trying to run a steady state compressible solution using rhoSimpleFoam for my research project. My problem involves an engine intake valve simulation but since it was diverging to make sure the correctness of my setup I ran the same simulation for a simple cylinder case, but the solution still blows up, so I am confident that the problem is in either my boundary conditions or numerical schemes. The logfile shows very high time step continuity errors.
I am applying fixedPressure boundary conditions for pressure at inlet and outlet as it's a pressure guided flow, and I have used pressureInletVelocity for the inlet velocity BC. I tried to change the boundary conditions to inlet mass flow rate to see if fixedPressure BC at both inlet and outlet was creating a problem but the solution still blows. For the numerical schemes, I tried using first order upwind as it's the most stable but that doesn't help. Reducing the under relaxation factors just delay the divergence but doesn't help otherwise.
I have reached a dead end here and any help will be appreciated. I have attached my boundary conditions and numerical schemes files.
Thanks.

Nihar
Attached Files
File Type: gz 0.tar.gz (956 Bytes, 5 views)
File Type: gz system.tar.gz (1.5 KB, 6 views)
Nero_CMU is offline   Reply With Quote

Old   December 29, 2015, 05:27
Default
  #2
Member
 
W.T
Join Date: Oct 2012
Posts: 35
Rep Power: 14
dybuk is on a distinguished road
Can you attach a logfile ?

Using fixedValue for pressure on inlet and outlet is not good idea - you fixed static pressure difference between in and out so velocity will rise in every iteration and finaly "blow up" simulation. Try use totalPressure instead of fixedValue BC on inlet.
Also the steady state compressible solvers in OF often require "soft start" - if you will use massFlowRate on inlet define it as a table - small mass flow on start, target flow rate after few hundred iteration. If you want to have pressure guided flow use uniformTotalPressure BC on inlet and
also define it as table.
dybuk is offline   Reply With Quote

Old   January 1, 2016, 02:56
Default
  #3
New Member
 
Nihar
Join Date: Oct 2014
Posts: 8
Rep Power: 12
Nero_CMU is on a distinguished road
I changed the boundary conditions as you had suggested. Following is my new pressure BC at the inlet.

a00000009_Inlet
{
type uniformTotalPressure
U U;
phi phi;
rho rho;
psi none;
gamma 1.4;
pressure table
(
(0 93001)
(100 100000)
);
}

Unfortunately that doesn't help and the solution is still diverging after a few iterations. I have attached the log file.

Another thing is when I turned off the turbulence parameters the solution didn't diverge. After around 5000 iterations it still hasn't converged either, but the mass flow rate I am getting is pretty close to the experimental value.
I wonder why this is happening.
Attached Files
File Type: txt log.txt (42.6 KB, 7 views)
Nero_CMU is offline   Reply With Quote

Old   January 6, 2016, 06:12
Default
  #4
New Member
 
Nihar
Join Date: Oct 2014
Posts: 8
Rep Power: 12
Nero_CMU is on a distinguished road
I tried multiple set of boundary conditions with constant pressure set at inlet and outlet, but the simulation blows up every time. If I change it to a constant mass flow rate inlet, it runs fine, so I am positive there is some issue when running a steady state solver for a pressure guided flow.
Has anyone faced a similar problem?
Nero_CMU is offline   Reply With Quote

Old   January 8, 2016, 05:47
Default
  #5
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16
Chrisi1984 is on a distinguished road
Hi,

you can try to do something like that for velocity inlet BC:

Quote:
type groovyBC;
value uniform (0 -1 0);
timelines (
{
name ptot_target ;
outOfBounds clamp;
fileName "$FOAM_CASE/rb_ptot_target";
}
);
variables (
"umag{INLET}=sum(mag(U)*mag(Sf()))/sum(mag(Sf()));"
"pstat{INLET}=sum(p*mag(Sf()))/sum(mag(Sf()));"
"ptot=pstat+0.5*rho*umag*umag;"
"pdiff=(ptot_target-ptot)/ptot_target;"
"relax=0.1;"
"vel=(umag+pdiff*relax);"
);
valueExpression "-vel*normal()";


}
This calculates the mass flow depending on the current inlet total pressure (with relaxation factor). By some adaptations you can perhaps use that for your problem.
For pressure you should use zero Gradient at inlet and fixedValue at the outlet.

Kind regards
Chrisi
Chrisi1984 is offline   Reply With Quote

Old   January 12, 2016, 10:57
Default
  #6
New Member
 
Nihar
Join Date: Oct 2014
Posts: 8
Rep Power: 12
Nero_CMU is on a distinguished road
But I have to fix the inlet pressure, so I can't set zeroGradient at inlet.
Nero_CMU is offline   Reply With Quote

Reply


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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Solver for transonic flow? Martin Hegedus OpenFOAM Running, Solving & CFD 22 December 16, 2015 05:59
Steady State solution ajinkya1 SU2 2 November 26, 2014 05:22
Steady State Solution animation rmageddon FLUENT 1 April 19, 2014 01:38
About the difference between steady and unsteady problems Lisa Main CFD Forum 11 July 5, 2000 15:37


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