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

chtMultiRegionFoam diverges in second iteration

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 15, 2022, 12:32
Default
  #21
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
No...it is named solid, but it is indeed a fluid region. It's the heat exchanger modeled by a porosity rich fluid flow.
Bloerb is offline   Reply With Quote

Old   March 16, 2022, 04:30
Default
  #22
New Member
 
Praharsha Reddy
Join Date: Dec 2019
Posts: 14
Rep Power: 7
lonewanderer is on a distinguished road
Quote:
Originally Posted by Bloerb View Post
No...it is named solid, but it is indeed a fluid region. It's the heat exchanger modeled by a porosity rich fluid flow.
got it. I will look into it. It would be better if you provide little info about geometry /case set up like piu58 suggested
lonewanderer is offline   Reply With Quote

Old   March 17, 2022, 15:15
Default thank you Bloerb and loneWanderer - still got problems
  #23
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6
boffin5 is on a distinguished road
To eliminate the mesh as a problem source, I simplified my case down to just a cube with a hole, and a radiator sitting in the hole. Attached is a triSurface.zip file with the geometry, and also an image file. But with this, it still fails.


to Bloerb,
In both fvOptions, I tried commenting out just the line with constantHeatTransfer, but got this:
Code:
[0] 
[0] --> FOAM FATAL IO ERROR: 
[0] keyword type is undefined in dictionary "/home/boffin5/cfdaero/radiator-f/constant/fluid/fvOptions/fluidTosolid"
[0]
Then I commented out the whole fluidTosolid section that the line was in, and got this:

Code:
--> 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-8/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 117
    attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 3500;  T = -2471.32
This also happened when I tried your suggestion earlier in the thread, when you said to add ".*" to the variables in the relaxation factors.


Seeing that the problem involved temperature, I tried to put temperature limits in both fvOptions files:
Code:
TemperatureLimit1
{
    type            limitTemperature;
    active          yes;
    selectionMode   all;
    min             0;
    max             1000;
}
but got this output:
Code:
Solving for fluid region fluid
Porosity region porosityBlockage:
    selecting model: DarcyForchheimer
    creating porous zone: porosityBlockage:porous
DILUPBiCGStab:  Solving for Ux, Initial residual = 1, Final residual = 0.0100531, No Iterations 1
DILUPBiCGStab:  Solving for Uy, Initial residual = 1, Final residual = 0.00801567, No Iterations 1
DILUPBiCGStab:  Solving for Uz, Initial residual = 1, Final residual = 0.00801538, No Iterations 1
DILUPBiCGStab:  Solving for e, Initial residual = 1.9362e-05, Final residual = 1.86332e-07, No Iterations 1
[1] #0  Foam::error::printStack(Foam::Ostream&)[0] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[0] #1  Foam::sigFpe::sigHandler(int) at ??:?
[1] #1  Foam::sigFpe::sigHandler(int) at ??:?
[0] #2  ? at ??:?
[1] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #3  Foam::heThermo<Foam::rhoReactionThermo, Foam::SpecieMixture<Foam::singleComponentMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > > >::he(Foam::Field<double> const&, Foam::List<int> const&) const in "/lib/x86_64-linux-gnu/libc.so.6"
Sorry, I don't know how to change the polynomials to constant in the thermophysicalProperties.

To loneWanderer,

My regionProperties file is copied directly from the heatExchanger tutorial in the heatTransfer/chtMultiRegion examples.

Bloerb, the reason I am setting it up with 2 stl files for the regions rather than with 2 blockMeshes, is that I want to have a template to use with eventual cases using more detailed bodies, such as an airplane fuselage (e.g. my "Meredith Effect" thread). And with the simple cube for a body, creating this template should not be such a huge challenge (easy for me to say ).


I must be setting records for the longest running unresolved case - but with your help, I hope to get it finished!
Attached Images
File Type: png SnapCrab_NoName_2022-3-16_11-6-31_No-00.png (75.4 KB, 9 views)
Attached Files
File Type: zip triSurface.zip (2.4 KB, 1 views)
boffin5 is offline   Reply With Quote

Old   March 17, 2022, 18:17
Default
  #24
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
I created a testcase for you....works for me in v2012 even if some minor modifications where necessary due to the differences to the foundation version. Seems to me like the culprit are your darcy coefficients....1e9 likely way to much to be stable..This works fine for me and took me 2 minutes to set up and test...you should have done the same.
Attached Files
File Type: zip test.zip (17.4 KB, 9 views)
lonewanderer likes this.
Bloerb is offline   Reply With Quote

Old   March 21, 2022, 14:15
Default Thank you Bloerb - almost there!
  #25
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6
boffin5 is on a distinguished road
Thank You for the zip file; I adjusted it to run in OF8, and it ran fine. Then, I adjusted it to work with my stl files which define a body and a radiator. My run script is shown here:
Code:
blockMesh
surfaceFeatures
snappyHexMesh -overwrite
splitMeshRegions -cellZones -overwrite  # results in domain with radiator carved out
topoSet  # results in carved out domain + solid radiator, and polyMesh in constant, constant/flu
id & constant/solid
foamToVTK -cellSet porousZone
rm -r constant/polyMesh
rm -r constant/fluid/polyMesh
blockMesh
snappyHexMesh -dict system/snappyHexMeshDict.2 -overwrite    #  carves out bod from domain

cp -r constant/polyMesh constant/fluid
rm -r constant/polyMesh

chtMultiRegionFoam
When I tried to run it, I got errors, of which this is a snippet:
Code:
    attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 3500;  T = -20712.73187
--> 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-8/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 117
    attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 3500;  T = -21590.11419
--> 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-8/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 117
    attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 3500;  T = -19415.28195
Therefore, the problem must be with my boundary conditions!

Now, note that in your case, the BCs are simple, only involving inlet, outlet and walls. Whereas I am modelling a body flying through a cube of open air, like a UFO. And this UFO needs system cooling, so it has an imbedded radiator. The domain of air is defined by inlet, outlet, leftside, rightside, upperwall and ground. 'ground' here is only a template for ground vehicles cases, not like this one. I have it as a patch in the blockMeshDict.


Note that when I execute splitMeshRegions, patches 'fluid_to_solid' and'solid_to_fluid' are automatically created. I have to list them in the BCs, and guess that the types are similar to that for the body. As an example, my boundary condition for fluid/T is show here:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 294;

boundaryField
{
    "rightSide|leftSide|upperWall|ground"
    {
        type            zeroGradient;
    }
        
    inlet
    {
        type            fixedValue;
        value           uniform 294;
    }
    
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 294;
        value           uniform 294;
    }
    
    bod
    {
        type            zeroGradient;
    }
       
    fluid_to_solid
    {
        type            zeroGradient;
    }

}
There must be errors in the way that I am defining my BCs. Can you advise me how to fix them?


A follow-on question: If my UFO is flying along at 30 meters per second, do I specify a velocity of 30 in the fluid/U boundary condition, and also in the solid/U one? Or just in the fluid?


If I can get these questions resolved, then at long last, I will be good to go with chtMultiRegion cases!!
boffin5 is offline   Reply With Quote

Old   March 22, 2022, 18:09
Default with a mix of OF8 and v2012 files, It RUNS!! - but need to fix a glitch
  #26
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6
boffin5 is on a distinguished road
Finally, I managed to get this OF8 chtMultiRegion case to run. And it came about through a bizarre discovery.

This is for my case with a simple body containing a heated radiator in a duct.

After much head scratching and looking about, I found that by using the thermophysicalProperties file from tutorials in v2012, my case would run. But with the same file from OF8 tutorials, it failed! So now I have this curious hybrid of OF8 and v2012 files.

However, something still needs fixing. In the runlog, there is this text:
Code:
Solving for fluid region solid
--> FOAM Warning : 
    From function virtual void Foam::fv::option::checkApplied() const
    in file cfdTools/general/fvOptions/fvOption.C at line 125
    Source solidTofluid defined for field e but never used
--> FOAM Warning : 
    From function virtual void Foam::fv::option::checkApplied() const
    in file cfdTools/general/fvOptions/fvOption.C at line 125
    Source solidTofluid defined for field e but never used
So it has something to do with field e, vs field h. I am attaching the complete run log, and also fluid/fvOptions, fluid/thermophysicalProperties, system/fluid/fvSchemes and system/fluid/fvSolution.

If I can find the issue in these files for the fluid region, the corresponding error should also be in the solid region files.

Prior to this, I have received valuable help from many members, thanks so much for that, and I hope that again one can help me sort this out.
Attached Files
File Type: txt fluid-fvOptions.txt (1.9 KB, 3 views)
File Type: txt system-fluid-fvSchemes.txt (1.6 KB, 0 views)
File Type: txt fluid-thermophysicalProperties.txt (1.7 KB, 1 views)
File Type: txt runlog(4).txt (11.8 KB, 3 views)
File Type: txt system-fluid-fvSolution.txt (1.3 KB, 0 views)
boffin5 is offline   Reply With Quote

Old   March 23, 2022, 05:56
Default
  #27
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
Code:
thermoType 
{     
type            heRhoThermo;     
mixture         pureMixture;     
transport       polynomial;     
thermo          hPolynomial;     
equationOfState icoPolynomial;     
specie          specie;     
energy          sensibleEnthalpy; // sensibleInternalEnergy 
}
You are solving for enthalpy h. But the source term somwhere inside fvOptions is defined for internalEnergy e. Hence you are not adding the region coupling and hence it works. Because your sourceTerm / your fvOption is not used at all.
Bloerb is offline   Reply With Quote

Old   March 26, 2022, 13:57
Default progress? with the mysterious chtMultiRegion case
  #28
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6
boffin5 is on a distinguished road
With lots of help from Bloerb (Thank You!), I was able to get a serial chtMultiRegion case to run, by adapting his case to my needs, which entail the use of stl files for the two regions.


The attached image shows the flow and streamlines going through a body and a heated radiator. Also attached are my U files for both fluid and solid, the latter representing a heated porous zone, and also my runscript.


Here is where it gets flaky. The image is with a U value for both fluid and solid of 10 meters per second. But that doesn't seem logical, so I changed the solid U value to 0. So I have fluid at velocity 10 moving over a stationary body. But this caused it to fail with this message:
Code:
--> FOAM FATAL ERROR: 
Negative initial temperature T0: -3.42718

    From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const, bool) const [with Thermo = Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hPolynomialThermo<Foam::icoPolynomial<Foam::specie> >, Foam::sensibleEnthalpy>]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 56.
So I thought, I should at least have some delta U between the regions, so I changed the fluid U value to 90, with the solid value at 10, and it ran. But a corresponding image of the streamlines looked exactly the same! Clearly, something is amiss here. So once again, I checked the chtMultiRegion tutorials.


In the coolingSphere tutorial, there is a U value for the fluid, 10 I think, but for the solid, the U file is completely absent.


In the heatExchanger tutorial, the U value for air is 5, and the value for the porous medium is 0.01. Why is this? Is it a math trick to enable the case to run?


Someone must have a handle on the intricacies of running these chtMultiRegion cases, with more than just cubes for the regions. I would love to hear the details. My efforts are focused on creating a template for more complex cases, and are still ongoing.
Attached Images
File Type: png SnapCrab_NoName_2022-3-26_9-34-7_No-00.png (24.6 KB, 12 views)
Attached Files
File Type: txt runscript(2).txt (552 Bytes, 0 views)
File Type: txt 0-solid-U.txt (686 Bytes, 2 views)
File Type: txt 0-fluid-U.txt (753 Bytes, 2 views)
boffin5 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
Free surface issues with interDyMFoam for hydroturbine oumnion OpenFOAM Running, Solving & CFD 0 October 6, 2017 15:05
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 03:50
Hardware-Configuration for Fluent HPC-Pack (8x) JohHaas Hardware 9 March 3, 2015 14:25
iteration no. explodes, solution diverges adamsinan OpenFOAM Running, Solving & CFD 3 September 27, 2012 03:45
Parallel runs slower with MTU=9000 than MTU=1500 Javier Larrondo FLUENT 0 October 28, 2007 23:30


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