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

chtMultiRegionSimpleFoam fatal error at pressure solution

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2023, 23:33
Default chtMultiRegionSimpleFoam fatal error at pressure solution
  #1
New Member
 
JC
Join Date: Feb 2023
Posts: 2
Rep Power: 0
jcrougs is on a distinguished road
Hello everyone, I have run into an issue when using the multi region solver with heat transfer For my problem, I have a rather complex 3D flowfield in and around an open flying vehicle. In a previous iteration of the solution, I was able to successfully find the flow field itself using simpleFoam with appropriate boundary conditions and actuator disks. Great, no problems with that part. The next step in this problem is to determine if this flow field is sufficient to keep the heat generating parts of the vehicle cool during flight. To approach this, I broke the problem up into a multiregion system and assigned the relevant thermophysical properties/solvers/etc. to the various regions of the domain using the example cases in the tutorials for chtMultiRegionSimpleFoam and chtMultiRegionFoam. My case is very similar to the heater case provided there, wherein there are some parts where heat is generated and some parts where it isn't, so most of my choices came from that one. My case has one fluid region (air0) and 12 solid regions. For getting the problem going, I set the heat generation to zero and set density as constant. The problem is happening on the first iteration of the solver, regardless of which solvers I try. When I run it I get the following:

-------------------------------
Time = 1


Solving for fluid region air0
DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 0.0102807, No Iterations 1
DILUPBiCGStab: Solving for Uy, Initial residual = 1, Final residual = 0.0177185, No Iterations 1
DILUPBiCGStab: Solving for Uz, Initial residual = 1, Final residual = 0.0188121, No Iterations 1
DILUPBiCGStab: Solving for h, Initial residual = 0.999002, Final residual = 0.000555317, No Iterations 1
limitTemperature temperatureLimit Lower limited 219685 (5%) of cells, with min limit 313
limitTemperature temperatureLimit Upper limited 0 (0%) of cells, with max limit 600
limitTemperature temperatureLimit Unlimited Tmin 313
limitTemperature temperatureLimit Unlimited Tmax 313
Min/max T:313 313
GAMG: Solving for p_rgh, Initial residual = 0.875655, Final residual = 0.082475, No Iterations 1
time step continuity errors : sum local = 0.350884, global = 0.0511227, cumulative = 0.0511227
Min/max rho:1.225 1.225


--> FOAM FATAL ERROR: (openfoam-2212)
updateCoeffs(const scalarField& snGradp) MUST be called before updateCoeffs() or evaluate() to set the boundary gradient.

From virtual void Foam::fixedFluxPressureFvPatchScalarField::updateC oeffs()
in file fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C at line 166.

FOAM exiting
------------------------------
I looked around the forums and found many other people who have run into this issue. The only real solution that seems to sometimes work is to change the p_rgh boundary condition to a zeroGradient one. When I tried that it also failed, but earlier. It instead silent quits after the line "Min/max T:313 313" with no error printout. It also silent quits if I just set the boundary condition to fixedValue. My p_rgh boundary conditions are all prghTotalPressure and my pressure boundary conditions are all set to calculated. If I set the p_rgh boundary conditions to fixedFluxPressure it also produces the same error listed above. Any other conditions on p or p_rgh that I have tried also trigger the silent quit. The actual condition on p that produced the correct flowfield in the non-heated case was primarily the zeroGradient, but that doesn't seem to solve at all after switching over to multiregion, and just triggers the silent quit.

Any ideas?
jcrougs is offline   Reply With Quote

Old   February 22, 2023, 15:25
Default
  #2
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
You are crashing the solver in iteration 1. This means that your problem is ill defined. This is most often due to a poor mesh, poor schemes, or poor boundary conditions. Hence, make sure that all of those are properly set up. Without more info on your specific case it is impossible to tell what causes the crash.
Based on your current description I suspect that the boundary conditions are wrong. What are the full conditions for p p_rgh and U on all patches?



You were able to solve the flow with simpleFoam and the same boundary conditions?
Bloerb is offline   Reply With Quote

Old   February 22, 2023, 17:01
Default
  #3
New Member
 
JC
Join Date: Feb 2023
Posts: 2
Rep Power: 0
jcrougs is on a distinguished road
I was able to solve it in simpleFoam with a different set of boundary conditions. The set that works in simpleFoam is:
p
freestream inlets: zeroGradient
freestream outlets: fixedValue (0)
all solid surfaces: zeroGradient

U
freestream inlets: fixedValue (0 -1 -2)
freestream outlets: inletOutlet, inletValue of (0 -1 -2)
freestream parallel domain walls: movingWallVelocity (0 -1 -2)
all solid surfaces: fixedValue (0, 0, 0)

I am using turbulence with k, nut, and omega, and these are identical between the two setups. When swapping over to chtMultiregionSimpleFoam, those pressure BCs caused the silent quit mentioned above, but it made it to the fatal error instead if I changed them as mentioned. Based on the error and what I know was already working, I am assuming it is an issue with either the T, alphat, or p_rgh setup since those are new. My current BCs for those are:
T
freestream inlets: fixedValue ($internalField)
freestream outlets: inletOutlet (inletValue/value $internalField)
all solid surfaces: zeroGradient (value $internalField)

solid-fluid interfaces:
type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T;
kappaMethod fluidThermo;
value $internalField;


alphat
All freestream BCs: calculated (initial value uniform 0.5)
Solid-fluid interfaces: compressible::alphatWallFunction (prt 0.85, value uniform 0)

p_rgh BC is p_rghTotalPressure with p0 101325 everywhere as mentioned above. As part of swapping over I also changed the p fixedValue to 101325 instead of 0.

Any further ideas? How would I verify if it is a mesh issue? snappyHexMesh didn't throw any warning and looking at the mesh in ParaView it looks like the correct thing and there aren't any obvious issues. I used the same mesh settings as the velocity-only case where it worked well.
jcrougs is offline   Reply With Quote

Old   February 23, 2023, 09:23
Default
  #4
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
Should be your combination of velocity and pressure boundary conditions that cause this. p is correctly calculated everywhere.



Why not use the same boundary conditions as in simpleFoam just use p_rgh instead of p.

Make sure that the internal value for p/p_rgh is not set to zero if you are applying 1e5 at the outlet for example. You can however still use 0 if you are using an incompressible equation of state in thermoPhysicalProperties if you do the same at the boundaries.



totalPressure everywhere might be a bit to unstable with backflow etc on start up
Bloerb is offline   Reply With Quote

Reply

Tags
chtmultiregionsimplefoam, fatal error, p_rgh


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
What is difference between static pressure and gauge pressure? aja1345 FLUENT 1 July 20, 2018 21:05
periodic straight tube flow, no mesh independent solution for pressure gradient thijs1909 FLUENT 5 May 16, 2018 10:04
Pressure Outlet Guage pressure Mohsin FLUENT 36 April 29, 2016 18:16
sonicFoam - pressure driven pipe: flow continuity violation and waveTransmissive BC Endel OpenFOAM Running, Solving & CFD 3 September 11, 2014 17:29
OpenFOAM solution is diverging for stress analysis in two-pahse microstructure. Sargam05 OpenFOAM 16 April 30, 2013 17:18


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