|
[Sponsors] | |||||
simulation works in OF8, but fails in OF2412. Why? |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Senior Member
Alan w
Join Date: Feb 2021
Posts: 318
Rep Power: 7 ![]() |
Hi,
Currently I am in the throes of converting my efforts from the .org version of OpenFoam (using OF8) to the .com version (using OF2412). So, I picked a chtMultiRegionSimpleFoam case to use, which works fine in OF8 to use as a test case. It is a radiator simulation in which flow goes through a duct in a body, and through a porous region simulating a radiator. After plodding through all of the syntax and procedural changes, I finally ended up at the point where the code actually executes chtMultiRegionSimpleFoam. Now, in the process of the prior errors, OF would give me clues as to how to fix the problem. But in this end step, the result is baffling (for me, anyway): Code:
Create time
Create fluid mesh for region fluid for time = 0
Create fluid mesh for region porous for time = 0
*** Reading fluid mesh thermophysical properties for region fluid
Adding to thermoFluid
Selecting thermodynamics package
{
type heRhoThermo;
mixture pureMixture;
transport polynomial;
thermo hPolynomial;
equationOfState icoPolynomial;
specie specie;
energy sensibleEnthalpy;
}
Adding to rhoFluid
Adding to UFluid
Adding to phiFluid
Adding to hRefFluid
Adding to ghFluid
Adding to ghfFluid
Adding to turbulenceFluid
Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
Cmu 0.09;
C1 1.44;
C2 1.92;
C3 0;
sigmak 1;
sigmaEps 1.3;
}
Adding to reactionFluid
Combustion model not active: combustionProperties not found
Selecting combustion model none
Adding to radiationFluid
Selecting radiationModel none
Adding to KFluid
Adding to dpdtFluid
Adding to fieldsFluid
Adding to QdotFluid
pressureControl
pMax 169118
pMin 8455.9
Adding MRF
No MRF models present
Adding fvOptions
Creating finite volume options from "constant/fvOptions"
Selecting finite volume options type constantHeatTransfer
Source: fluidToporous
Selecting finite volume options type interRegionExplicitPorositySource
Source: porosityBlockage
- selecting inter region mapping
Creating mesh-to-mesh addressing for fluid and porous regions using cellVolumeWeight
Overlap volume: 0.00189348
*** Reading fluid mesh thermophysical properties for region porous
Adding to thermoFluid
Selecting thermodynamics package
{
type heRhoThermo;
mixture pureMixture;
transport polynomial;
thermo hPolynomial;
equationOfState icoPolynomial;
specie specie;
energy sensibleEnthalpy;
}
Adding to rhoFluid
Adding to UFluid
Adding to phiFluid
Adding to hRefFluid
Adding to ghFluid
Adding to ghfFluid
Adding to turbulenceFluid
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
Adding to reactionFluid
Combustion model not active: combustionProperties not found
Selecting combustion model none
Adding to radiationFluid
Radiation model not active: radiationProperties not found
Selecting radiationModel none
Adding to KFluid
Adding to dpdtFluid
Adding to fieldsFluid
Adding to QdotFluid
pressureControl
pMax 200000
pMin 10000
Adding MRF
No MRF models present
Adding fvOptions
Creating finite volume options from "constant/fvOptions"
Selecting finite volume options type constantHeatTransfer
Source: porousToair
- selecting inter region mapping
Creating mesh-to-mesh addressing for porous and fluid regions using cellVolumeWeight
Overlap volume: 0.00189334
Region: fluid Courant Number mean: 0.313316 max: 5195.38
Region: porous Courant Number mean: 1.77951 max: 9.7342
Region: fluid Courant Number mean: 0.313316 max: 5195.38
Region: porous Courant Number mean: 1.77951 max: 9.7342
Time = 1
[stack trace]
=============
#1 Foam::sigFpe::sigHandler(int) in /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#2 ? in /lib/x86_64-linux-gnu/libc.so.6
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#4 Foam::operator/(Foam::UList<double> const&, Foam::UList<double> const&) in /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#5 Foam::diagonalSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#6 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) in /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
#7 ? in /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
#8 Foam::fvMesh::solve(Foam::fvMatrix<double>&, Foam::dictionary const&) const in /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
#9 ? in /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/bin/chtMultiRegionFoam
#10 ? in /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/bin/chtMultiRegionFoam
#11 ? in /lib/x86_64-linux-gnu/libc.so.6
#12 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#13 ? in /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/bin/chtMultiRegionFoam
=============
[DESKTOP-L9QTPS2:4075 :0:4075] Caught signal 8 (Floating point exception: tkill(2) or tgkill(2))
==== backtrace (tid: 4075) ====
0 /lib/x86_64-linux-gnu/libucs.so.0(ucs_handle_error+0x2ec) [0x7759c0312f2c]
1 /lib/x86_64-linux-gnu/libucs.so.0(+0x3530d) [0x7759c031430d]
2 /lib/x86_64-linux-gnu/libucs.so.0(+0x3572a) [0x7759c031472a]
3 /lib/x86_64-linux-gnu/libc.so.6(+0x458d0) [0x7759c0a458d0]
4 /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x11c) [0x7759c0aa49bc]
5 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x1e) [0x7759c0a4579e]
6 /lib/x86_64-linux-gnu/libc.so.6(+0x458d0) [0x7759c0a458d0]
7 /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam6divideERNS_5FieldIdEERKNS_5UListIdEES6_+0x6a) [0x7759c1859e8a]
8 /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4FoamdvERKNS_5UListIdEES3_+0x74) [0x7759c185bbd4]
9 /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam14diagonalSolver5solveERNS_5FieldIdEERKS2_h+0x4b) [0x7759c16d7d3b]
10 /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam8fvMatrixIdE15solveSegregatedERKNS_10dictionaryE+0xb8f) [0x7759c648025f]
11 /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(+0x54b5e2) [0x7759c5f4b5e2]
12 /usr/lib/openfoam/openfoam2412/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZNK4Foam6fvMesh5solveERNS_8fvMatrixIdEERKNS_10dictionaryE+0x28) [0x7759c5f3a468]
13 chtMultiRegionFoam(+0x69a74) [0x63052331ba74]
14 chtMultiRegionFoam(+0x34406) [0x6305232e6406]
15 /lib/x86_64-linux-gnu/libc.so.6(+0x2a578) [0x7759c0a2a578]
16 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x7759c0a2a63b]
17 chtMultiRegionFoam(+0x43b45) [0x6305232f5b45]
But I know that in this community there are people who can, and I hope that they might be able to offer some advice. I can certainly provide the case files if someone can have a look. |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Alan w
Join Date: Feb 2021
Posts: 318
Rep Power: 7 ![]() |
I'm sorry, I should have included the boundary conditions, so here they are.
btw, the body is in free space, with no external walls around the domain. For the body with duct: Code:
Boundary Conditions for Fluid
-------------------------------------------------------------------
T
internalField uniform 551.55;
boundaryField
{
frontier
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 551.55;
}
outlet
{
type inletOutlet;
inletValue uniform 551.55;
value uniform 551.55;
}
bod {
type zeroGradient;
}
}
-------------------------------------------------------------
U
internalField uniform (90 0 0);
boundaryField
{
frontier
{
type slip;
}
inlet
{
type fixedValue;
value uniform (5 0 0);
}
bod {
type fixedValue;
value uniform (5 0 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
}
-----------------------------------------------------------------
alphat
internalField uniform 0;
boundaryField
{
frontier
{
type slip;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
bod
{
type compressible::alphatWallFunction;
value uniform 0;
}
}
------------------------------------------------------------------------
epsilon
internalField uniform 0.54;
boundaryField
{
frontier
{
type slip;
}
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
bod
{
type epsilonWallFunction;
value $internalField;
}
}
--------------------------------------------------------------------
k
internalField uniform 0.375;
boundaryField
{
frontier
{
type slip;
}
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
bod
{
type kqRWallFunction;
value $internalField;
}
}
------------------------------------------------------------
nut
internalField uniform 0;
boundaryField
{
frontier
{
type slip;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
bod
{
type nutkWallFunction;
value uniform 0;
}
}
------------------------------------------------------------------
p
internalField uniform 84559;
boundaryField
{
frontier
{
type slip;
}
inlet
{
type calculated;
value uniform 84559;
}
outlet
{
type calculated;
value uniform 84559;
}
bod
{
type calculated;
value uniform 84559;
}
}
-----------------------------------------------------------------
p_rgh
internalField uniform 84559;
boundaryField
{
frontier
{
type slip;
}
inlet
{
type fixedFluxPressure;
}
outlet
{
type fixedValue;
value $internalField;
}
bod
{
type fixedFluxPressure;
}
}
Code:
Boundary Conditions for Porous Body
--------------------------------------------------------------------
T
internalField uniform 350;
boundaryField
{
inlet
{
type fixedValue;
value uniform 400;
}
outlet
{
type inletOutlet;
inletValue uniform 350;
value uniform 350;
}
frontier
{
type zeroGradient;
}
rad_radinlet {
type fixedValue;
value $internalField;
}
rad_radoutlet {
type inletOutlet;
inletValue $internalField;
value $internalField;
}
rad_radfrontier {
type zeroGradient;
}
}
-----------------------------------------------------------
U
internalField uniform (0.01 0 0);
boundaryField
{
frontier
{
type slip;
}
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
rad_radinlet
{
type calculated;
value uniform (0 0 0);
}
rad_radoutlet
{
type calculated;
value uniform (0 0 0);
}
rad_radfrontier
{
type noSlip;
}
}
-------------------------------------------------------------------
p
internalField uniform 100000;
boundaryField
{
frontier
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
outlet
{
type calculated;
value $internalField;
}
rad_radinlet
{
type calculated;
value $internalField;
}
rad_radoutlet
{
type calculated;
value $internalField;
}
rad_radfrontier
{
type zeroGradient;
}
}
-------------------------------------------------------------------
p_rgh
internalField uniform 100000;
boundaryField
{
frontier
{
type fixedFluxPressure;
}
inlet
{
type fixedFluxPressure;
}
outlet
{
type fixedValue;
value uniform 100000;
}
rad_radinlet
{
type fixedFluxPressure;
}
rad_radoutlet
{
type fixedFluxPressure;
}
rad_radfrontier
{
type fixedFluxPressure;
}
}
|
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 894
Rep Power: 19 ![]() |
This will take some time to untangle, but let me just parse the output error for you - that may point you in the right direction to solve it.
The stack trace shows that the code fell over with a SIGFPE (floating point error) from a divide operation - usually a divide by zero error. This occurred in the diagonal solver, right at the start of the first time step ... so I guessing that this was when solving for the density field. So - that's your starting point. Looking at your BC's - you have "type slip" for all variables on patch "frontier" ... that's clearly a typo. Not sure why this would give a divide by zero error, but please check you boundaries and then try again. Good luck! |
|
|
|
|
|
|
|
|
#4 |
|
New Member
Neeraj
Join Date: Oct 2022
Location: Punjab, INDIA
Posts: 4
Rep Power: 5 ![]() |
If it is working with of8 then work on that and make further changes with that , There is no need to stitch with the versions , All we need to solve the problems in hand
|
|
|
|
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 894
Rep Power: 19 ![]() |
I understand your sentiment, but I am not sure that your comment is very helpful to the OP ... there may be a good reason why he needs to change version. For example, whilst I tend to stick to the Foundation fork of OpenFOAM, I do use the .COM fork when I need access to different snappyHexMesh parameters, or to some of the turbulence models that are present only in the ESI fork.
|
|
|
|
|
|
|
|
|
#6 |
|
Senior Member
Alan w
Join Date: Feb 2021
Posts: 318
Rep Power: 7 ![]() |
Thank you nee and Tobermory,
First, why I changed: After running OpenFoam for a long time, my linux emulator (VMware) irreparably died, so I decided to change to wsl/ubuntu. Getting things working took quite a while, and I decided to go to an up-to-date version of OpenFoam. In the .org world, this was OF11, which had changed to a modular approach. Getting my head around this was going to be another challenge, so I opted for the current .com version, which is 2412. Concerning Tobermory's comment on my slip boundary condition: I am (obviously) thoroughly confused by BCs. For this case, involving a body in open free stream, I looked at the motorBike tutorial. In this one, the domain boundaries for U are given in an #include file, 'frontBackUpperpatches. The BC for this one is given as slip. They have the same condition in U, p and omega. But apparently this doesn't apply to my body-with-a-duct in open air. So I keep fishing and trying. |
|
|
|
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 894
Rep Power: 19 ![]() |
You're absolutely right Alan - apologies: "slip" is fine to use for all of the fields (it's essentially just the same as a symmetryPlane boundary condition) ... I had never seen it used on anything other than the U field, and was confusing it with the "noSlip" condition which is clearlyonly for U.
|
|
|
|
|
|
|
|
|
#8 |
|
Senior Member
Alan w
Join Date: Feb 2021
Posts: 318
Rep Power: 7 ![]() |
Hi Everyone,
This case is comprised of a simple blocky shape with a duct and porousbody/heat exchanger, and it's meant to form the basis of more detailed studies. I had it running at one time in OF8, but despite my efforts at iterating the boundary conditions, it keeps failing immediately in 2412. So I am getting on my knees and hoping that someone can have a look at the zip file and help find the error. It's a simple simulation, and the well initiated in the community should cut through it like the proverbial knife through butter. But I don't want to minimize the difficulty, and would just be thankful for any help that I might be fortunate enough to receive. |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [snappyHexMesh] snappyHexMesh fails but Fluent mesh works ? | Kummi | OpenFOAM Meshing & Mesh Conversion | 2 | June 13, 2024 06:29 |
| CFG file Set Up | Nicola_Fontana | SU2 | 5 | November 16, 2021 13:48 |
| kEpsilon simulation works with a reynolds number of 1e6 but not 5e4 | kodexys | OpenFOAM Running, Solving & CFD | 0 | August 3, 2016 13:00 |
| FSI TWO-WAY SIMULATION | Smagmon | CFX | 1 | March 6, 2009 14:24 |
| CFX FAQ updated - my simulation fails to converge | Glenn Horrocks | CFX | 0 | September 1, 2007 08:33 |