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

ReactingFoam (OF 5.0) - skyrocketing min/max temp

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Swagga5aur

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2020, 08:03
Default ReactingFoam (OF 5.0) - skyrocketing min/max temp
  #1
New Member
 
Join Date: Jan 2020
Posts: 4
Rep Power: 6
KerThan is on a distinguished road
Hello, I've pretty big problem with pressure-driven flow in simple 2D pipe. I want to push out gas from pipe (N2) via another gas (CH4). For low pressures (max ~500 Pascals on inlet/outlet/internal) everything is okay, but for those that I would like to simulate (atmospheric pressure as internal, flow driven by \DeltaP ~ 2 atm), everything is running wild. My mesh is pretty good, and I've tried to set up Co to 0.1 but it didn't solve my problem.


Warning that I get:

Code:
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCGStab:  Solving for H2O, Initial residual = 1.00507e-06, Final residual = 1.73363e-07, No Iterations 1
DILUPBiCGStab:  Solving for CH4, Initial residual = 0.17301, Final residual = 0.00542353, No Iterations 1
DILUPBiCGStab:  Solving for CO2, Initial residual = 1.22766e-06, Final residual = 2.11756e-07, No Iterations 1
DILUPBiCGStab:  Solving for N2, Initial residual = 0.248774, Final residual = 0.00658698, No Iterations 1
DILUPBiCGStab:  Solving for h, Initial residual = 0.760182, Final residual = 0.0245965, No Iterations 1
--> FOAM Warning :
    From function Foam::scalar Foam::janafThermo<EquationOfState>::limit(Foam::scalar) const [with EquationOfState = Foam::perfectGas<Foam::specie>; Foam::scalar = double]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-5.x/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 117
     attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 5000;  T = -8.2578
T:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 293;

boundaryField
{
    inlet    
    {
        type     zeroGradient;
        value    uniform 293; 

    }
    outlet
    {
        type    zeroGradient;
    }
    frontAndBack
    {
        type            empty;
    }
    
    walls
    {
        type            zeroGradient;
    }
}
// ************************************************************************* //
I've heard that there was option in older versions of OF to fix Lewis number at 1, but I can't find hsEqn file in my OpenFoam version.
KerThan is offline   Reply With Quote

Old   January 29, 2020, 18:28
Default
  #2
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Hello KerThan, would it be possilbe for you to share your case? Regarding the Lewis number in openfoam, the majority of combustion solvers (such as reactingfoam) in openfoam assume this as explained here https://bugs.openfoam.org/view.php?id=277

Regards Lasse
Swagga5aur is offline   Reply With Quote

Old   January 30, 2020, 05:40
Default
  #3
New Member
 
Join Date: Jan 2020
Posts: 4
Rep Power: 6
KerThan is on a distinguished road
Hello, thank you for your respond. Here is my case: https://drive.google.com/drive/folde...78NLKA6Q7s-hRP


Anyway something goes wrong and now even for low pressures that doesn't work well (there is some flux of methane that push off nitrogen from pipe, but pressure goes wild too, even for small values).


If I understand it well, if I want to have pressure driven flow, I have to put BCs that allow me to have gradient of pressure in my geometry. I can use as it two different fixedValues (always =/=0 - I don't know why, but I don't have any iteration if I put as outlet 0 pressure), or totalPressure condition (where value = internalfield in my casE) and use pressureInletVelocity for velocity BC.



I've tried before to make it with totalPressure on inlet and zeroGradient/outletInlet/totalPressure at outlet (with pressureInletVelocity; / pressureInletOutletVelocity; in U), but always I've got no flux and only one iteration, or any flux at all.
KerThan is offline   Reply With Quote

Old   January 31, 2020, 17:11
Default
  #4
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Alright so, first of all the pressure you specify isn't the gauge pressure so 30 is total pressure of 30 Pascal, which I don't know if is realistic so I specified a inlet pressure of 3e5 and outlet of 1e5.

Afterwards I changed the temperature equation as it was overdefined previously with fixed at inlet and outlet.

I turned of combustion and chemistry model as there is no combustion.

I updated your fvSolution directory regarding relaxationFactors (from 1 (no relaxation) to 0.3(under-relaxation) as reactingFoam is quite sensitive, especially when not being used for its intended purposes.

Note that the temperature equation of reactingFoam may cause unrealistic temperature increases, so if you are solving for a flow with no temperature field I would make a new solver than removes the u necessary parts (or fix it via fvOption). This is further describe here: having trouble using reactingFoam with reactions turned off

A side note, I didn't check but check what you Mach number is but check it in any case.

Case download: https://www.dropbox.com/s/jcxjpkx8do...nFlow.zip?dl=0

Regards Lasse
altinel and KerThan like this.
Swagga5aur is offline   Reply With Quote

Old   February 3, 2020, 08:02
Default
  #5
New Member
 
Join Date: Jan 2020
Posts: 4
Rep Power: 6
KerThan is on a distinguished road
Thank you a lot! In the meantime, I've partly solve my problem in other way. I don't know why, but after switch to OF 7.0, temperature limiter (tmin and tmax = 293 K) started to work as it should, and my case ran prety well (I had to use really small timestep, but result was pretty good). Maybe I had some problems with my OF installation.



Regards,
KerThan
KerThan is offline   Reply With Quote

Old   March 23, 2024, 18:30
Default
  #6
New Member
 
lisa
Join Date: Sep 2022
Posts: 3
Rep Power: 4
lisa.yelistratova is on a distinguished road
Hi Swagga5aur! I am working on a similar problem as KerThan. Could you resend this case pls? The archive in your link is empty
lisa.yelistratova is offline   Reply With Quote

Old   April 11, 2024, 06:12
Default
  #7
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Hello Lisa,

Sorry for the inconvenience don't know why its corrupted, remade the case in OF7, haven't tested it much though.
https://www.dropbox.com/scl/fo/9sxi6...ip0on9rzx&dl=0


Regards Lasse
Swagga5aur 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
All Mach number implicit solver with Kurganov-Tadmore scheme - pisoCentralFoam mkraposhin OpenFOAM Programming & Development 106 February 27, 2024 18:38
Maximum number of iterations exceeded chtmultiregionsimpleFoam Moncef OpenFOAM Running, Solving & CFD 28 July 13, 2020 15:26
How I can introduce my power heat (W) in chtMultiRegionFoam? aminem OpenFOAM Pre-Processing 32 August 29, 2019 03:23
conjugate heat transfer in OpenFOAM skuznet OpenFOAM Running, Solving & CFD 99 March 16, 2017 06:07
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 14:12


All times are GMT -4. The time now is 13:45.