|
[Sponsors] |
chtMultiRegionFoam diverges in second iteration |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#21 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 ![]() |
No...it is named solid, but it is indeed a fluid region. It's the heat exchanger modeled by a porosity rich fluid flow.
|
|
![]() |
![]() |
![]() |
![]() |
#22 |
New Member
Praharsha Reddy
Join Date: Dec 2019
Posts: 14
Rep Power: 7 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#23 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6 ![]() |
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] 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 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; } 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" 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! |
|
![]() |
![]() |
![]() |
![]() |
#24 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#25 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6 ![]() |
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 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 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; } } 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!! |
|
![]() |
![]() |
![]() |
![]() |
#26 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6 ![]() |
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 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. |
|
![]() |
![]() |
![]() |
![]() |
#27 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 ![]() |
Code:
thermoType { type heRhoThermo; mixture pureMixture; transport polynomial; thermo hPolynomial; equationOfState icoPolynomial; specie specie; energy sensibleEnthalpy; // sensibleInternalEnergy } |
|
![]() |
![]() |
![]() |
![]() |
#28 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 288
Rep Power: 6 ![]() |
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. 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. |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
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 |