|
[Sponsors] |
need help with setting up buoyantSimpleFoam case |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 12, 2024, 13:18 |
need help with setting up buoyantSimpleFoam case
|
#1 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
Hi all,
For a long time I've been working on a case with a radiator in a duct, mounted on an airplane. An image is attached. Of late, I have been trying to use buoyantSimpleFoam to simulate it. As usual, I use tutorials for guidance, but I am finding that boundary conditions for the various tutorials are all over the map. To construct the geometry, I used ennova, and the output was 2 meshes, one for the airplane/duct and the other for the heat exchanger. They were created simultaneously, therefore the meshes interface perfectly. In OpenFoam, I used mergeMesh to combine them, yielding 2 regions, and then stitchMesh to relate the faces at the radiator inlet and outlet faces, resulting in one region. Then I used topoSet to collect the radiator cells into a porous zone. Here is the output from topoSet: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = 0 Reading topoSetDict Time = 0 mesh not changed. Created cellSet porousCells Applying source boxToCell Adding cells with center within boxes 1((2.02542 -0.22352 -0.64202) (2.08257 0 -0.47057)) cellSet porousCells now size 4197 Created cellZoneSet porousZone Applying source setToCellZone Adding all cells from cellSet porousCells ... cellZoneSet porousZone now size 4197 End Code:
Create time Create mesh for time = 0 Keeping old VTK files in "/home/boffin5/cfdaero/meredith-buoyant-stitch/VTK" --> FOAM FATAL ERROR: Problem From function void Foam::fvMeshSubset::setLargeCellSubset(const labelList&, Foam::label, Foam::label, bool) in file fvMeshSubset/fvMeshSubset.C at line 1172. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::fvMeshSubset::setLargeCellSubset(Foam::List<int> const&, int, int, bool) at ??:? Code:
Exec : checkMesh // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 811893 faces: 975893 internal faces: 925868 cells: 148777 faces per cell: 12.7826 boundary patches: 11 point zones: 1 face zones: 3 cell zones: 1 Overall number of cells of each type: hexahedra: 1924 prisms: 8 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 146845 Breakdown of polyhedra by number of faces: faces number of cells 5 4 6 449 7 3188 8 5529 9 10506 10 14141 11 16019 12 15209 13 18605 14 20894 15 15960 16 11265 17 7344 18 3913 19 2047 20 904 21 399 22 191 23 93 24 63 25 39 26 22 27 11 28 10 29 8 30 3 31 2 32 2 33 1 34 2 35 2 36 3 37 3 39 1 40 1 41 1 42 1 43 2 52 2 54 1 56 1 66 1 67 1 83 1 86 1 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology flap 5531 10013 ok (non-closed singly connected) fuselage 6860 14868 ok (non-closed singly connected) lips 4865 7908 ok (non-closed singly connected) fairing 20535 32634 ok (non-closed singly connected) spinner 359 945 ok (non-closed singly connected) trailingedge 635 826 ok (non-closed singly connected) edges 1640 2251 ok (non-closed singly connected) inlet 135 272 ok (non-closed singly connected) outlet 135 272 ok (non-closed singly connected) frontier 2317 4506 ok (non-closed singly connected) clplane 6207 12369 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-15 -7 -7) (50 3.98651e-09 7) Mesh has 3 geometric (non-empty/wedge) directions (1 1 1) Mesh has 3 solution (non-empty) directions (1 1 1) Boundary openness (-1.55353e-18 5.92364e-16 2.52647e-17) OK. Max cell openness = 3.46311e-16 OK. Max aspect ratio = 34.163 OK. Minimum face area = 5.32353e-10. Maximum face area = 1.18133. Face area magnitudes OK. Min volume = 9.63107e-13. Max volume = 1.45954. Total volume = 6368.32. Cell volumes OK. Mesh non-orthogonality Max: 84.2436 average: 10.4766 *Number of severely non-orthogonal (> 70 degrees) faces: 145. Non-orthogonality check OK. <<Writing 145 non-orthogonal faces to set nonOrthoFaces Face pyramids OK. ***Max skewness = 4.63047, 1 highly skew faces detected which may impair the quality of the results <<Writing 1 skew faces to set skewFaces Coupled point location match (average 0) OK. Failed 1 mesh checks. End Code:
object alphat; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -1 0 0 0 0]; //internalField uniform 0; internalField uniform 1e-3; boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type calculated; value $internalField; } outlet { type calculated; value $internalField; } fuselage { type compressible::alphatWallFunction; value $internalField; } spinner { type compressible::alphatWallFunction; value $internalField; } lips { type compressible::alphatWallFunction; value $internalField; } fairing { type compressible::alphatWallFunction; value $internalField; } flap { type compressible::alphatWallFunction; value $internalField; } edges { type compressible::alphatWallFunction; value $internalField; } trailingedge { type compressible::alphatWallFunction; value $internalField; } } Code:
object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -3 0 0 0 0]; //internalField uniform 0.54; internalField uniform 200; boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; value uniform 200; } outlet { type inletOutlet; inletValue $internalField; value $internalField; } fuselage { type epsilonWallFunction; value $internalField; } Code:
object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 1; // 0.375 boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type turbulentIntensityKineticEnergyInlet; intensity 0.05; value uniform 1; } outlet { type inletOutlet; inletValue uniform 1; value uniform 1; } fuselage { type kqRWallFunction; value uniform 1; } Code:
object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type calculated; value uniform 0; } outlet { type calculated; value uniform 0; } fuselage { type nutkWallFunction; value uniform 0; } Code:
object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1e5; //90812 boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type zeroGradient; } outlet { type fixedValue; value $internalField; } fuselage { type zeroGradient; } Code:
object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1e5; //84559 boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type fixedFluxPressure; value uniform 0; } outlet { type prghPressure; p uniform 1e5; value uniform 1e5; } fuselage { type fixedFluxPressure; value uniform 0; } Code:
object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 282.214; boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type fixedValue; value $internalField; } outlet { type zeroGradient; } fuselage { type zeroGradient; } Code:
object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (59.161 0 0); boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type fixedValue; value uniform (59.161 0 0); } outlet { type zeroGradient; } fuselage { type noSlip; } Code:
Create time Create mesh for time = 0 SIMPLE: Convergence criteria found p_rgh: tolerance 0.0001 U: tolerance 1e-05 e: tolerance 1e-05 "(k|epsilon|omega)": tolerance 0.001 Reading thermophysical properties Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } Reading field U Reading/calculating face flux field phi Creating turbulence model Selecting turbulence model type RAS Selecting RAS turbulence model kEpsilon RAS { model kEpsilon; turbulence on; printCoeffs on; Cmu 0.09; C1 1.44; C2 1.92; C3 0; sigmak 1; sigmaEps 1.3; } Creating thermophysical transport model Selecting thermophysical transport type RAS Selecting default RAS thermophysical transport model eddyDiffusivity Reading g Reading hRef Calculating field g.h Reading pRef Reading field p_rgh No MRF models present Radiation model not active: radiationProperties not found Selecting radiationModel none Creating finite volume options from "constant/fvOptions" Selecting finite volume options model type explicitPorositySource Source: porosity1 - selecting cells using cellZone porousZone - selected 4197 cell(s) with volume 0.00219013 Porosity region porosity1: selecting model: DarcyForchheimer creating porous zone: porousZone Starting time loop Time = 0.25 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.00181065, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0963853, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.00167042, No Iterations 1 smoothSolver: Solving for h, Initial residual = 1, Final residual = 0.0197347, No Iterations 1 DICPCG: Solving for p_rgh, Initial residual = 0.999649, Final residual = 0.00553735, No Iterations 95 time step continuity errors : sum local = 0.0254991, global = -1.95086e-05, cumulative = -1.95086e-05 smoothSolver: Solving for epsilon, Initial residual = 0.586636, Final residual = 0.0554639, No Iterations 1 bounding epsilon, min: -704323 max: 612853 average: 458.189 smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.0828106, No Iterations 2 bounding k, min: -450.635 max: 413.426 average: 2.56551 ExecutionTime = 2.54 s ClockTime = 2 s Time = 0.5 smoothSolver: Solving for Ux, Initial residual = 0.995391, Final residual = 6.33002e+237, No Iterations 1000 smoothSolver: Solving for Uy, Initial residual = 0.999018, Final residual = 6.78445e+237, No Iterations 1000 smoothSolver: Solving for Uz, Initial residual = 0.996324, Final residual = 7.79098e+237, No Iterations 1000 #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib64/libc.so.6" #3 void Foam::magSqr<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::magSqr<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #5 ? at ??:? #6 __libc_start_main in "/lib64/libc.so.6" #7 ? at /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:122 |
|
May 13, 2024, 07:39 |
|
#2 |
Senior Member
|
Hi,
Following your request, here are my thoughts on the case. I think the problem is in IC/BC for turbulence, since after the first iteration we get: Code:
smoothSolver: Solving for epsilon, Initial residual = 0.586636, Final residual = 0.0554639, No Iterations 1 bounding epsilon, min: -704323 max: 612853 average: 458.189 smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.0828106, No Iterations 2 bounding k, min: -450.635 max: 413.426 average: 2.56551 BCs for pressure (p) should be calculated. With this non-orthogonality I would suggest to increase number of non-orthogonal correctors. What are your discretization schemes? |
|
May 13, 2024, 11:06 |
Thanks alexeym,
|
#3 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
I'm very encouraged to receive some support, and will run with your suggestions. Here is my fvSchemes file:
Odds are that you will have suggestions/revisions, and that is great! Code:
object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss upwind; div(phid,p) bounded Gauss upwind; div(phiv,p) bounded Gauss linear; div(phi,K) bounded Gauss linear; div(phi,h) bounded Gauss upwind; div(phi,e) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,R) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; div((rho*R)) Gauss linear; div(R) Gauss linear; div(U) Gauss linear; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear skewCorrected; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear skewCorrected; } snGradSchemes { default corrected; } |
|
May 13, 2024, 12:31 |
|
#4 |
Senior Member
|
Your skewCorrected usage is not quite correct. See
Code:
incompressible/pimpleFoam/laminar/contaminatedDroplet2D/system/fvSchemes Gauss linear gradient reconstruction scheme can behave strangely on non-orthogonal meshes, use leastSquares instead. Example is in the same file. Since your turbulence model diverges, try adding relaxation to k and epsilon equations. See Code:
heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSolution |
|
May 17, 2024, 13:34 |
incorporated changes; still no luck
|
#5 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
Hi alexeym,
After incorporating your suggestions, I am still not having any luck. Always, the simulation fails at the start of time step 2, with this message: Code:
Create time Create mesh for time = 0 SIMPLE: Convergence criteria found p_rgh: tolerance 0.0001 U: tolerance 1e-05 e: tolerance 1e-05 "(k|epsilon|omega)": tolerance 0.001 Reading thermophysical properties Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } Reading field U Reading/calculating face flux field phi Creating turbulence model Selecting turbulence model type RAS Selecting RAS turbulence model kEpsilon bounding k, min: 1e-16 max: 1 average: 1e-16 RAS { model kEpsilon; turbulence on; printCoeffs on; Cmu 0.09; C1 1.44; C2 1.92; C3 0; sigmak 1; sigmaEps 1.3; } Creating thermophysical transport model Selecting thermophysical transport type RAS Selecting default RAS thermophysical transport model eddyDiffusivity Reading g Reading hRef Calculating field g.h Reading pRef Reading field p_rgh No MRF models present Radiation model not active: radiationProperties not found Selecting radiationModel none Creating finite volume options from "constant/fvOptions" Selecting finite volume options model type fixedTemperatureConstraint Source: source1 - selecting cells using cellZone porousZone - selected 7832 cell(s) with volume 0.00219 Starting time loop streamLine streamLines: automatic track length specified through number of sub cycles : 5 Reading surface description: yNormal forces forceCoeffs1: Not including porosity effects forceCoeffs forceCoeffs1: Not including porosity effects streamLine streamLines write: seeded 60 particles Tracks:60 Total samples:60 forceCoeffs forceCoeffs1 write: Cm = 0.0234299 Cd = -0.19514 Cl = 0.000176957 Cl(f) = 0.0235184 Cl(r) = -0.0233414 Time = 1 DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 0.0171283, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 1, Final residual = 0.0112126, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 1, Final residual = 0.0105996, No Iterations 1 DILUPBiCGStab: Solving for h, Initial residual = 0.999996, Final residual = 0.0943934, No Iterations 7 DICPCG: Solving for p_rgh, Initial residual = 0.999995, Final residual = 0.00815624, No Iterations 2 time step continuity errors : sum local = 39877.5, global = 3442.25, cumulative = 3442.25 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.996627, Final residual = 1.09285e-16, No Iterations 1 bounding epsilon, min: 5.11307e-18 max: 340.053 average: 56.4302 DILUPBiCGStab: Solving for k, Initial residual = 1, Final residual = 6.80437e-11, No Iterations 1 bounding k, min: 2.9683e-17 max: 1 average: 4.40645e-09 ExecutionTime = 7.71 s ClockTime = 8 s Time = 2 DILUPBiCGStab: Solving for Ux, Initial residual = 0.0498066, Final residual = 0.000245803, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 0.0945033, Final residual = 0.000519746, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 0.0954388, Final residual = 0.000618185, No Iterations 1 DILUPBiCGStab: Solving for h, Initial residual = 0.99999, Final residual = 0.0989113, No Iterations 97 --> FOAM FATAL ERROR: Negative initial temperature T0: -8.74027e+06 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::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo <Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam:: perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>] Code:
porosity1 { type DarcyForchheimer; cellZone porousZone; // D 100; // Very little blockage // D 200; // Some blockage but steady flow // D 500; // Slight waviness in the far wake // D 1000; // Fully shedding behavior d (5e7 -1000 -1000); f (0 0 0); coordinateSystem { type cartesian; origin (0 0 0); coordinateRotation { type axesRotation; e1 (0 1 0); e3 (0 0 1); } } limitT { type limitTemperature; active yes; selectionMode all; min 10; max 700; } } So everything is hanging now, and I don't know how to proceed. Again, I am hoping for help! |
|
May 18, 2024, 05:23 |
|
#6 |
Senior Member
|
If we take a look at the solver loop: it complains about negative temperatures after solution of the energy equation. More precisely, it happens in thermo.correct(), where OpenFOAM tries to calculate temperature from pressure and energy. This process is iterative (since we need to update thermophysical properties). If during these iterations negative temperature is encountered, the process is stoped with the error you see. Temperature limiting fvOption is not used at this stage, so it won't help here.
This iterative process uses new value of enthalpy and old value of pressure. So it your pressure on the previous solver iteration is strange or if new enthalpy is nonsense, temperature calculation fails. Could you check pressure values (save data every time step)? I assume you know what you are doing from physical point of view. We can use numerical tricks to make solution converge, yet it does not mean the solution is correct (or even meaningful). |
|
May 18, 2024, 14:47 |
results from probes
|
#7 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
Hi alexeym, Thanks for continuing to help me!
Here is what I did to monitor the pressure; I hope it is what you were referring to: I put in three probes: one in front of the radiator (0), one in the radiator itself (1) and one aft of the radiator (2). I specified the time step as 0.001. It fails immediately after time step 0.001: Code:
# Probe 0 (1.428 -0.095 -0.625) # Probe 1 (2.054 -0.095 -0.556) # Probe 2 (2.544 -0.095 -0.518) # Time 0 1 2 0 90812 90812 90812 0.001 90811.9954456 90811.8122094 90812.0142948 Code:
Time = 0.002 DILUPBiCGStab: Solving for Ux, Initial residual = 0.0498066423017, Final residual = 0.000245803139224, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 0.0945032705665, Final residual = 0.000519746009646, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 0.095438849419, Final residual = 0.000618184986078, No Iterations 1 DILUPBiCGStab: Solving for h, Initial residual = 0.99998982141, Final residual = 0.099620289924, No Iterations 96 --> FOAM FATAL ERROR: Negative initial temperature T0: -8740269.93104 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::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>] in file /home/boffin5/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 56. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>:: T(double, double, double, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam:: perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double) const, bool) const at ??:? #3 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam:: hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() at ??:? #4 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam:: hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() at ??:? #5 ? at ??:? #6 __libc_start_main in "/lib64/libc.so.6" #7 ? at /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:122 But I can't do it without smart people such as you. Alan |
|
May 19, 2024, 05:57 |
|
#8 |
Senior Member
|
In fact, what I meant:
- Set writeControl to timeStep, set writeInterval to 1. - Run simulation. - Open results in ParaView. As an alternative you can use fieldMinMax function object to get minimum/maximum of a field and their locations. This way you can see if there is a problem with pressure field. Could you also post your fvSolution to see if there are problems with algorithm and linear solver settings. |
|
May 19, 2024, 12:24 |
Hopeful debugging data
|
#9 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
Hi alexeym,
Here is some debug information for you: btw, I am using rhoPoroussimpleFoam as the solver, and OF8 as my OpenFoam version. Attached is an image of the p and T fields from paraView. fvSolution: Code:
object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p_rgh { solver PCG; preconditioner DIC; tolerance 1e-08; relTol 0.01; } "(U|e|h|k|epsilon)" { solver PBiCGStab; preconditioner DILU; tolerance 1e-05; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; residualControl { p_rgh 1e-4; U 1e-5; e 1e-5; // possibly check turbulence fields "(k|epsilon|omega)" 1e-3; } } relaxationFactors { fields { p_rgh 0.7; } equations { U 0.3; e 0.5; "(k|epsilon|R)" 0.7; } } Code:
Create time Create mesh for time = 0 SIMPLE: Convergence criteria found p_rgh: tolerance 0.0001 U: tolerance 1e-05 e: tolerance 1e-05 "(k|epsilon|omega)": tolerance 0.001 Reading thermophysical properties Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } Reading field U Reading/calculating face flux field phi Creating turbulence model Selecting turbulence model type RAS Selecting RAS turbulence model kEpsilon bounding k, min: 1e-16 max: 1 average: 1e-16 RAS { model kEpsilon; turbulence on; printCoeffs on; Cmu 0.09; C1 1.44; C2 1.92; C3 0; sigmak 1; sigmaEps 1.3; } Creating thermophysical transport model Selecting thermophysical transport type RAS Selecting default RAS thermophysical transport model eddyDiffusivity Reading g Reading hRef Calculating field g.h Reading pRef Reading field p_rgh No MRF models present Radiation model not active: radiationProperties not found Selecting radiationModel none Creating finite volume options from "constant/fvOptions" Selecting finite volume options model type fixedTemperatureConstraint Source: source1 - selecting cells using cellZone porousZone - selected 7832 cell(s) with volume 0.00219 Starting time loop streamLine streamLines: automatic track length specified through number of sub cycles : 5 Reading surface description: yNormal forces forceCoeffs1: Not including porosity effects forceCoeffs forceCoeffs1: Not including porosity effects streamLine streamLines write: seeded 60 particles Tracks:60 Total samples:60 forceCoeffs forceCoeffs1 write: Cm = 0.0234299 Cd = -0.19514 Cl = 0.000176957 Cl(f) = 0.0235184 Cl(r) = -0.0233414 fieldMinMax FieldsMinMax write: min(p) = 90812 in cell 0 at location (2.69364 -0.128285 -0.543849) max(p) = 90812 in cell 0 at location (2.69364 -0.128285 -0.543849) min(T) = 282.214 in cell 0 at location (2.69364 -0.128285 -0.543849) max(T) = 282.214 in cell 0 at location (2.69364 -0.128285 -0.543849) Time = 1 DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 0.0171283, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 1, Final residual = 0.0112126, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 1, Final residual = 0.0105996, No Iterations 1 DILUPBiCGStab: Solving for h, Initial residual = 0.999996, Final residual = 0.0943934, No Iterations 7 DICPCG: Solving for p_rgh, Initial residual = 0.999995, Final residual = 0.00815624, No Iterations 2 time step continuity errors : sum local = 39877.5, global = 3442.25, cumulative = 3442.25 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.996627, Final residual = 1.09285e-16, No Iterations 1 bounding epsilon, min: 5.11307e-18 max: 340.053 average: 56.4302 DILUPBiCGStab: Solving for k, Initial residual = 1, Final residual = 6.80437e-11, No Iterations 1 bounding k, min: 2.9683e-17 max: 1 average: 4.40645e-09 ExecutionTime = 10.57 s ClockTime = 11 s streamLine streamLines write: seeded 60 particles Tracks:60 Total samples:42956 forceCoeffs forceCoeffs1 write: Cm = 0.0353188 Cd = -0.191414 Cl = 0.0546054 Cl(f) = 0.0626215 Cl(r) = -0.0080161 fieldMinMax FieldsMinMax write: min(p) = -363633 in cell 47699 at location (48.6976 -2.14317 5.86476) max(p) = 1.98735e+06 in cell 301460 at location (49.2027 -3.57373 -2.92557) min(T) = -1.69207e+08 in cell 32536 at location (49.7342 -1.15187 -5.15114) max(T) = 1.31228e+08 in cell 34002 at location (49.7795 -6.56458 -2.87879) Time = 2 DILUPBiCGStab: Solving for Ux, Initial residual = 0.0498066, Final residual = 0.000245803, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 0.0945033, Final residual = 0.000519746, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 0.0954388, Final residual = 0.000618185, No Iterations 1 DILUPBiCGStab: Solving for h, Initial residual = 0.99999, Final residual = 0.0989113, No Iterations 97 --> FOAM FATAL ERROR: Negative initial temperature T0: -8.74027e+06 radiator-dom1 and radiator-dom2 are the faces on the front and back of the heat exchanger, and radwall is its surrounding faces. The side of the half-model is clplane, and the remainder of the domain bits are various pieces of the fuselage and fairing. Code:
object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 90812; //84559 boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type zeroGradient; } outlet { type fixedValue; value $internalField; } fuselage { type zeroGradient; } spinner { type zeroGradient; } lips { type zeroGradient; } fairing { type zeroGradient; } flap { type zeroGradient; } edges { type zeroGradient; } trailingedge { type zeroGradient; } radiator-dom1 { type slip; } radiator-dom2 { type slip; } radwall { type zeroGradient; } } Code:
object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1e5; //84559 boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type zeroGradient; } outlet { type fixedValue; value $internalField; } fuselage { type zeroGradient; } spinner { type zeroGradient; } lips { type zeroGradient; } fairing { type zeroGradient; } flap { type zeroGradient; } edges { type zeroGradient; } trailingedge { type zeroGradient; } radiator-dom1 { type slip; } radiator-dom2 { type slip; } radwall { type zeroGradient; } } Code:
object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 282.214; boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type fixedValue; value $internalField; } outlet { type inletOutlet; value $internalField; inletValue $internalField;; } fuselage { type zeroGradient; } spinner { type zeroGradient; } lips { type zeroGradient; } fairing { type zeroGradient; } flap { type zeroGradient; } edges { type zeroGradient; } trailingedge { type zeroGradient; } radiator-dom1 { type slip; } radiator-dom2 { type slip; } radwall { type zeroGradient; } } Alan |
|
May 20, 2024, 04:52 |
|
#10 |
Senior Member
|
So, after the first solver iteration you have strange pressure distribution and non-physical temperatures. I do not think it is worth doing second iteration.
1. As I said earlier, you should increase nNonOrthogonalCorrectors. With your mesh, it should be 1 or 2. 2. Relaxation: usually it is 0.3 for p_rgh, 0.7 for U. You do not solve equation for e but for h. So, you should relax h equation, not e. 3. Try starting from p_rgh == 0 and p == 1e5. |
|
May 20, 2024, 13:12 |
fails differently; that should help?
|
#11 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
Hi alexeym,
Per your guidance, I changed fvSolution: Code:
object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p_rgh { solver PCG; preconditioner DIC; tolerance 1e-08; relTol 0.01; } "(U|e|h|k|epsilon)" { solver PBiCGStab; preconditioner DILU; tolerance 1e-05; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 2; pRefCell 0; pRefValue 0; residualControl { p_rgh 1e-4; U 1e-5; e 1e-5; // possibly check turbulence fields "(k|epsilon|omega)" 1e-3; } } relaxationFactors { fields { p_rgh 0.3; // 0.7 } equations { U 0.7; // 0.3 //e 0.5; "(k|epsilon|R)" 0.7; } } Now the run output reads: Code:
fieldMinMax FieldsMinMax write: min(p) = 1e+15 in cell 0 at location (2.69364 -0.128285 -0.543849) max(p) = 1e+15 in cell 0 at location (2.69364 -0.128285 -0.543849) min(T) = 282.214 in cell 0 at location (2.69364 -0.128285 -0.543849) max(T) = 282.214 in cell 0 at location (2.69364 -0.128285 -0.543849) Time = 1 DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 0.0314276, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 1, Final residual = 0.0703642, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 1, Final residual = 0.0660991, No Iterations 1 DILUPBiCGStab: Solving for h, Initial residual = 1, Final residual = 0.0956216, No Iterations 10 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::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam:: hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>] in file /home/boffin5/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 70 Energy -> temperature conversion failed to converge: iter Test e/h Cv/p Tnew 0 282.214 -16006.1 1004.4 3.72319e+19 1 3.72319e+19 3.73957e+22 1004.4 3.72319e+19 2 3.72319e+19 3.73957e+22 1004.4 3.72319e+19 3 3.72319e+19 3.73957e+22 1004.4 3.72319e+19 . . . . . . . . . . . . . 98 3.72319e+19 3.73957e+22 1004.4 3.72319e+19 99 3.72319e+19 3.73957e+22 1004.4 3.72319e+19 100 3.72319e+19 3.73957e+22 1004.4 3.72319e+19 101 3.72319e+19 3.73957e+22 1004.4 3.72319e+19 --> FOAM FATAL ERROR: Maximum number of iterations exceeded: 100 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::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas <Foam::specie> >, Foam::sensibleEnthalpy>] in file /home/boffin5/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 106. FOAM aborting I suppose that a useful conclusion can be drawn from this, but it is beyond me. Thank you for sticking with me! |
|
May 20, 2024, 15:16 |
|
#12 |
Senior Member
|
Why 1e15? 1 Gbar, I think it is a bit too much (higher than in the center of the earth). In my message it was 1 bar (1e5 Pa).
You do not see difference in temperature estimations in the output. Though, it does not matter, since value of 3e19 correspond to the pressure of 1e15, which is not quite applicable to your case. |
|
May 22, 2024, 12:02 |
maybe it's the mesh
|
#13 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
Hi alexeym,
After again getting run failures due to negative initial temperature, I have decided to try a different method of creating the mesh. I will get back to you again when I have finished creating a new mesh. |
|
May 24, 2024, 13:17 |
tweaked the mesh, no improvement
|
#14 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
Hi again alexeym,
Hoping against hope, I tweaked my mesh. Again, checkMesh shows 1 highly skewed face, which should not be a problem. And once again, it fails at timestep 2 with a negative initial temperature. I am not an expert at code writing, nor of gas thermodynamics, just a mere design engineer with an ME degree. So I am at a loss. Here is the result from checkMesh: Code:
Create time Create polyMesh for time = constant Time = constant Mesh stats points: 1008475 faces: 1227295 internal faces: 1170370 cells: 189473 faces per cell: 12.6544 boundary patches: 14 point zones: 2 face zones: 6 cell zones: 1 Overall number of cells of each type: hexahedra: 2367 prisms: 6 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 187100 Breakdown of polyhedra by number of faces: faces number of cells 6 422 7 3990 8 6932 9 18727 10 19267 11 19434 12 18490 13 22607 14 24645 15 19330 16 14196 17 9003 18 5055 19 2647 20 1206 21 539 22 220 23 135 24 82 25 42 26 34 27 20 28 16 29 15 30 4 31 2 32 12 33 11 34 3 35 2 36 1 37 1 38 3 40 1 42 1 43 1 44 1 45 1 47 1 49 1 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology flap 5545 10036 ok (non-closed singly connected) fuselage 7200 15502 ok (non-closed singly connected) lips 4832 7856 ok (non-closed singly connected) fairing 24113 37463 ok (non-closed singly connected) spinner 358 944 ok (non-closed singly connected) trailingedge 635 826 ok (non-closed singly connected) edges 1624 2223 ok (non-closed singly connected) inlet 135 272 ok (non-closed singly connected) outlet 135 272 ok (non-closed singly connected) frontier 2317 4506 ok (non-closed singly connected) clplane 6648 13238 ok (non-closed singly connected) radiator-dom2 0 0 ok (empty) radiator-dom1 0 0 ok (empty) radwall 3383 4224 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-15 -7 -7) (50 3.98651e-09 7) Mesh has 3 geometric (non-empty/wedge) directions (1 1 1) Mesh has 3 solution (non-empty) directions (1 1 1) Boundary openness (-3.62911e-18 4.01673e-16 1.60005e-17) OK. Max cell openness = 3.49772e-16 OK. Max aspect ratio = 29.8061 OK. Minimum face area = 2.51545e-10. Maximum face area = 1.18132. Face area magnitudes OK. Min volume = 5.69978e-13. Max volume = 1.45954. Total volume = 6368.32. Cell volumes OK. Mesh non-orthogonality Max: 80.6191 average: 11.2348 *Number of severely non-orthogonal (> 70 degrees) faces: 255. Non-orthogonality check OK. <<Writing 255 non-orthogonal faces to set nonOrthoFaces Face pyramids OK. ***Max skewness = 4.75385, 1 highly skew faces detected which may impair the quality of the results <<Writing 1 skew faces to set skewFaces Coupled point location match (average 0) OK. Failed 1 mesh checks. End Code:
Create time Create mesh for time = 0 SIMPLE: Convergence criteria found p: tolerance 0.001 U: tolerance 0.0001 e: tolerance 0.001 "(k|epsilon|omega)": tolerance 0.001 Reading thermophysical properties Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; } Reading field U Reading/calculating face flux field phi Creating turbulence model Selecting turbulence model type RAS Selecting RAS turbulence model kEpsilon bounding k, min: 1e-16 max: 1 average: 1e-16 RAS { model kEpsilon; turbulence on; printCoeffs on; Cmu 0.09; C1 1.44; C2 1.92; C3 0; sigmak 1; sigmaEps 1.3; } Creating thermophysical transport model Selecting thermophysical transport type RAS Selecting default RAS thermophysical transport model eddyDiffusivity Reading g Reading hRef Calculating field g.h Reading pRef Reading field p_rgh pressureControl pMax 200000 pMin 50000 No MRF models present Radiation model not active: radiationProperties not found Selecting radiationModel none Creating finite volume options from "constant/fvOptions" Selecting finite volume options model type fixedTemperatureConstraint Source: source1 - selecting cells using cellZone porousZone - selected 23787 cell(s) with volume 0.00219013 Starting time loop streamLine streamLines: automatic track length specified through number of sub cycles : 5 --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 80806, 5(100465 100500 100501 100509 100467), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 138440, 6(161307 161306 162010 162011 162008 162007), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 141308, 6(164050 164049 164710 164711 164712 164713), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 142054, 6(164713 164712 165365 165366 165367 165368), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 144795, 6(167137 167136 167751 167752 167753 167754), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 145498, 6(167730 167731 168356 168357 168358 168359), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 146081, 6(168262 168261 168867 168868 168869 168870), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 146101, 6(168292 168293 168884 168885 168886 168887), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 146743, 5(168857 168858 169453 169454 169451), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 147681, 6(169610 169609 170256 170257 170258 170259), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 148330, 5(170240 170241 170829 170827 170825), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 149713, 6(171394 171395 172016 172017 172018 172019), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 150514, 6(172706 172708 172709 172710 172711 172707), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 151060, 4(173195 173194 173196 173197), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 154552, 6(175656 175655 176232 176233 176230 176229), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 154583, 6(175683 175682 176256 176257 176258 176259), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 155404, 5(176954 176953 176952 176957 176955), produces a valid tet decomposition. --> FOAM Warning : From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76 No base point for face 158175, 6(178834 178835 179504 179505 179506 179507), produces a valid tet decomposition. Reading surface description: yNormal forces forceCoeffs1: Not including porosity effects forceCoeffs forceCoeffs1: Not including porosity effects streamLine streamLines write: seeded 60 particles Tracks:60 Total samples:60 forceCoeffs forceCoeffs1 write: Cm = 0.0127246 Cd = -0.000195089 Cl = 0.000194975 Cl(f) = 0.0128221 Cl(r) = -0.0126272 fieldMinMax FieldsMinMax write: min(p) = 100000 in cell 0 at location (2.76951 -0.136111 -0.562052) max(p) = 100000 in cell 0 at location (2.76951 -0.136111 -0.562052) min(T) = 282.214 in cell 0 at location (2.76951 -0.136111 -0.562052) max(T) = 282.214 in cell 0 at location (2.76951 -0.136111 -0.562052) Time = 1 DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 0.0273403, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 1, Final residual = 0.0740393, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 1, Final residual = 0.0287669, No Iterations 1 smoothSolver: Solving for e, Initial residual = 0.999999, Final residual = 0.0879115, No Iterations 6 DICPCG: Solving for p_rgh, Initial residual = 0.999482, Final residual = 0.000610146, No Iterations 1 DICPCG: Solving for p_rgh, Initial residual = 0.00256748, Final residual = 2.1228e-05, No Iterations 1 DICPCG: Solving for p_rgh, Initial residual = 9.50824e-05, Final residual = 7.98586e-07, No Iterations 190 time step continuity errors : sum local = 94.4224, global = -2.21546, cumulative = -2.21546 pressureControl: p max 3.74934e+06 pressureControl: p min -803987 smoothSolver: Solving for epsilon, Initial residual = 0.999497, Final residual = 1.44467e-16, No Iterations 2 bounding epsilon, min: 1.04376e-17 max: 380.001 average: 15.2023 smoothSolver: Solving for k, Initial residual = 1, Final residual = 4.47558e-10, No Iterations 2 bounding k, min: 2.20827e-17 max: 1 average: 6.27641e-08 ExecutionTime = 8.76 s ClockTime = 9 s streamLine streamLines write: seeded 60 particles Tracks:60 Total samples:17052 forceCoeffs forceCoeffs1 write: Cm = 0.83455 Cd = 36.2825 Cl = 0.206268 Cl(f) = 0.937684 Cl(r) = -0.731417 fieldMinMax FieldsMinMax write: min(p) = 50000 in cell 36 at location (49.8046 -6.80455 -6.81129) max(p) = 200000 in cell 0 at location (2.76951 -0.136111 -0.562052) min(T) = -2.49422e+08 in cell 13287 at location (49.7648 -2.5124 6.05812) max(T) = 6.34698e+08 in cell 13306 at location (49.7763 -5.26952 0.942598) Time = 2 DILUPBiCGStab: Solving for Ux, Initial residual = 0.137064, Final residual = 0.00352126, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 0.192966, Final residual = 0.00250268, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 0.125257, Final residual = 0.00255952, No Iterations 1 smoothSolver: Solving for e, Initial residual = 1, Final residual = 0.05108, No Iterations 1 --> FOAM FATAL ERROR: Negative initial temperature T0: -6.34971e+06 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::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleInternalEnergy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>] in file /home/boffin5/OpenFOAM/OpenFOAM-8/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 56. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::T(double, double, double, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double) const, bool) const at ??:? #3 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:? #4 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:? #5 ? at ??:? #6 __libc_start_main in "/lib64/libc.so.6" #7 ? at /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:122 Should you or anyone else have a few minutes and a philanthropic urge, I have placed the case files into this dropbox location for review: https://www.dropbox.com/scl/fi/gxq5l...=fsu55q19&dl=0 Often in this forum, I have seen queries from FSAE or Formula Student teams seeking assistance in their design of a heat exchanger for their car, but I haven't seen any substantive answers. And the thermal engineering journals are bursting with papers from researchers who have done this kind of analysis, but the case files are never available. If you know of any, please forward! |
|
May 25, 2024, 14:43 |
Another way to skin a cat, not quite right. Can you comment?
|
#15 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
Hi alexeym,
Prior to trying to solve my case with buoyantSimpleFoam, I had been using chtMultiRegionFoam with a 2 region version. Although it ran to completion, the fields as seen in paraView had problems. Please see the attached image; there are crazy problems, especially in the T field. So I decided to change my approach. However, it seems that the multiRegion case is closer to a satisfactory resolution, so I would be indebted to you if you can stick with me and give advice as to how I can fix it. In hopes that you will spot something obvious, I will list below the boundary conditions for pressure and temperature for both fluid and solid. However, the entire case can be found in this dropbox link: https://www.dropbox.com/scl/fi/xnib9...=3uc3edu4&dl=0 I have been working on this case for awfully long time, but I will not surrender! Perhaps you can help put me out of my misery. In the following, 'radiator-interface' is the set of faces on the periphery of the radiator. For brevity, I will only show all the geometry features in the first BC. fluid alphat: Code:
object alphat; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -1 0 0 0 0]; internalField uniform 1e-3; boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type calculated; value uniform 0; } outlet { type calculated; value uniform 0; } fuselage { type compressible::alphatWallFunction; value uniform 0; } spinner { type compressible::alphatWallFunction; value uniform 0; } lips { type compressible::alphatWallFunction; value uniform 0; } fairing { type compressible::alphatWallFunction; value uniform 0; } flap { type compressible::alphatWallFunction; value uniform 0; } radiator-interface { type compressible::alphatWallFunction; value uniform 0; } edges { type compressible::alphatWallFunction; value uniform 0; } trailingedge { type compressible::alphatWallFunction; value uniform 0; } } Code:
object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -3 0 0 0 0]; //internalField uniform 0.54; internalField uniform 200; boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { //type zeroGradient; type slip; } inlet { type fixedValue; value $internalField; } outlet { type zeroGradient; } fuselage { type epsilonWallFunction; value $internalField; } Code:
object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.375; boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type fixedValue; value $internalField; } outlet { type zeroGradient; } fuselage { type kqRWallFunction; value $internalField; } Code:
object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type calculated; value uniform 0; } outlet { type calculated; value uniform 0; } fuselage { type nutkWallFunction; value uniform 0; } Code:
object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 90812; boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type zeroGradient; } outlet { type fixedValue; value uniform 90812; } fuselage { type zeroGradient; } Code:
object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1e5; boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type zeroGradient; } outlet { type fixedValue; value $internalField; } fuselage { type zeroGradient; } Code:
object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 282.214; boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type fixedValue; value uniform 282.214; } outlet { type inletOutlet; inletValue uniform 282.214; value uniform 282.214; } fuselage { type zeroGradient; } Code:
object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (59.161 0 0); boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type fixedValue; value uniform (59.161 0 0); } outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } fuselage { type noSlip; } (rad_radinlet and rad_rad_outlet are the front and back faces of the radiator, and rad_radfrontier is the set of peripheral faces): Code:
object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 90812; boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type zeroGradient; } outlet { type fixedValue; value uniform 90812; } rad_radinlet { type calculated; value uniform 90812; } rad_radoutlet { type calculated; value uniform 90812; } rad_radfrontier { type calculated; value uniform 90812; } "proc.*" { type processor; } } Code:
object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1e05; boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type fixedFluxPressure; } outlet { type fixedValue; value $internalField; } rad_radinlet { type fixedFluxPressure; } rad_radoutlet { type fixedValue; value $internalField; } rad_radfrontier { type fixedFluxPressure; } Code:
object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 377.59; boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type fixedValue; value uniform 377.59; } outlet { type inletOutlet; inletValue uniform 376; value uniform 376; } rad_radinlet { type fixedValue; value $internalField; } rad_radoutlet { type inletOutlet; inletValue $internalField; value $internalField; } rad_radfrontier { type zeroGradient; } Code:
object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; //internalField uniform (10 0 0); internalField uniform (0.01 0 0); boundaryField { #includeEtc "caseDicts/setConstraintTypes" frontier { type slip; } inlet { type fixedValue; value uniform (0.01 0 0); } outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } rad_radinlet { type fixedValue; value uniform (0.01 0 0); } rad_radoutlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } rad_radfrontier { type noSlip; } |
|
June 2, 2024, 13:38 |
I thought I had it, but alas, it is still inop
|
#16 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
After discovering that my controlDict listed the wrong solver, I changed it to rhoPorousSimpleFoam, and the simulation ran to completion! But I knew it was too good to be true.
It turns out that U was set to zero, one of those changes one makes in efforts to debug. When I set it to a realistic value, the simulation, yet once again, failed with a negative initial temperature. Back to square zero. All my previous questions still apply. Sigh! |
|
June 3, 2024, 14:27 |
need help in debugging - at least the paraView images are very pretty
|
#17 |
Senior Member
Alan w
Join Date: Feb 2021
Posts: 277
Rep Power: 6 |
In hopes that someone can help me make sense of debugging results from my rhoPorousSimpleFoam simulation of a heat exchanger, and perhaps help me get to the Promised Land, I am showing some paraView images.
I found that the case would fail with a floating point exception, and a search into this excellent forum found that I could bypass the failure by adding "unset FOAM_SIGFPE" to the run script. Then I could note at which time step the failure occured, and edit the endTime to look at the results prior to the failure. The attached image shows the results at velocities of 1.0, and then 59.16 which is my design point. At U = 1 the p and U fields look psychedelic; at least the radiator color is reasonable. It seems that the higher the velocity, the sooner the case fails. At U =59.16 it failed at timeStep 13. The p and T fields went crazy, but at least the U field shows some velocity within the duct. However, at the inlet, it shows the velocity as 0.0017, whereas my BC has it at 59.16. Apparently my BC for U is wrong; here it is: Code:
object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (59.161 0 0); // (59.161 0 0) boundaryField { #includeEtc "caseDicts/setConstraintTypes" clplane { type slip; } frontier { type slip; } inlet { type flowRateInletVelocity; massFlowRate constant 0.1; rhoInlet 1; value uniform (59.161 0 0); //type fixedValue; //value uniform (59.161 0 0); } outlet { //type inletOutlet; type pressureInletOutletVelocity; value uniform (0 0 0); inletValue uniform (0 0 0); //type zeroGradient; } fuselage { type noSlip; } spinner { type noSlip; } lips { type noSlip; } fairing { type noSlip; } flap { type noSlip; } edges { type noSlip; } trailingedge { type noSlip; } radiator-dom1 { type slip; } radiator-dom2 { type slip; } radwall { type noSlip; } } I would be utterly grateful for any help I might receive with this! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting up a transient case with laminar incompressible flow | VentinS | OpenFOAM Running, Solving & CFD | 10 | May 19, 2019 12:26 |
Is Playstation 3 cluster suitable for CFD work | hsieh | OpenFOAM | 9 | August 16, 2015 14:53 |
Setting up Case for different turbulence models with buoyancy-driven flow | MisterX | OpenFOAM Pre-Processing | 1 | November 19, 2012 05:10 |
Setting up a turbine nozzle case | cfdengineer | CFX | 2 | August 2, 2010 05:49 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 12:24 |