|
[Sponsors] |
May 28, 2024, 23:43 |
Modify the previous case of OpenFOAM
|
#1 |
New Member
Rohmawati Iis
Join Date: Apr 2014
Posts: 24
Rep Power: 12 |
Hello everyone,
I am a newcomer to using OpenFOAM. I tried to run an impinging jet simulation and modified a previous case. I have the 'constant' folder, 'system' folder, '.foam' file, and a results folder named '533' containing the iteration data. As I understand, we should use the '0' folder instead of copying the previous case data. I tried to modify the necessary files in the '533' folder, but it didn't work well. It works when I run 'blockMesh', but I cannot run the solver (simpleFoam/pisoFoam/icoFoam). Is there anything wrong? Please give me suggestions. I appreciate your kindness. Thank you! |
|
May 29, 2024, 04:17 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
What are you modifying between the old and new case?
|
|
May 29, 2024, 04:20 |
|
#3 |
New Member
Rohmawati Iis
Join Date: Apr 2014
Posts: 24
Rep Power: 12 |
I want to modify the mesh to a coarser one. The old case is a non-reacting jet, but in the new one, I would like to perform the reacting/combustion process as well.
|
|
May 29, 2024, 08:38 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Alright, you cannot just copy the result folder because its content won't match your new mesh.
you should instead use the mapFields utility to map the results of your first case on your new mesh. Cheers, Yann |
|
June 9, 2024, 23:40 |
|
#5 | |
New Member
Rohmawati Iis
Join Date: Apr 2014
Posts: 24
Rep Power: 12 |
Quote:
I did it by using the '0' directory instead of the '533' result. Now, I am going to change the previous case from a non-reacting condition to a reacting/combustion condition. I tried to modify it as per the attachments, but it didn't work well. Could you help me fix it? You can view the attachments here https://drive.google.com/drive/folde...gU?usp=sharing Thank you for your kindness. |
||
June 10, 2024, 08:42 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
Could you elaborate? What did you do and what is not working? |
|
June 11, 2024, 00:16 |
|
#7 | |
New Member
Rohmawati Iis
Join Date: Apr 2014
Posts: 24
Rep Power: 12 |
Quote:
--> FOAM FATAL IO ERROR: (openfoam-2312 patch=240220) Entry 'CHEMKINFile' not found in dictionary "/home/ishrein/OpenFOAM/ishrein-v2312/run/combCoarse/constant/thermophysicalProperties" file: constant/thermophysicalProperties at line 20 to 118. From bool Foam::dictionary::readEntry(const Foam::word&, T&, Foam::keyType:ption, Foam::IOobjectOption::readOption) const [with T = Foam::fileName] in file ./src/OpenFOAM/lnInclude/dictionaryTemplates.C at line 327. Could you help me to fix it? Thank you for your kindness. |
||
June 11, 2024, 04:28 |
|
#8 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
I'm not very familiar with reaction solvers, but I think you get this error because your CHEMKINFile parameter is misplaced in thermophysicalProperties.
Try something like this (basically getting CHEMKINFile and CHEMKINThermoFile out of the mixture dictionary) and see if it solves the error: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2112 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type hePsiThermo; mixture reactingMixture; transport sutherland; thermo janaf; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } mixture { specie { nMoles 1; molWeight 28.97; // Adjust based on your mixture } thermodynamics { Tlow 200; Thigh 5000; Tcommon 1000; Hf 0; } transport { As 1.67212e-6; Ts 170.672; } } CHEMKINFile "chem.inp"; CHEMKINThermoFile "therm.dat"; [...] |
|
June 11, 2024, 05:10 |
|
#9 | |
New Member
Rohmawati Iis
Join Date: Apr 2014
Posts: 24
Rep Power: 12 |
Quote:
Thank you for your response. The CHEMKINFile and CHEMKINThermoFile parameters are already outside of the mixture dictionary. I don't know why I always encounter error messages like the one listed above. |
||
June 11, 2024, 05:21 |
|
#10 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
As long as you get this error:
Code:
--> FOAM FATAL IO ERROR: (openfoam-2312 patch=240220) Entry 'CHEMKINFile' not found in dictionary "/home/ishrein/OpenFOAM/ishrein-v2312/run/combCoarse/constant/thermophysicalProperties" What is your current thermophysicalProperties file? |
|
June 11, 2024, 06:07 |
|
#11 | |
New Member
Rohmawati Iis
Join Date: Apr 2014
Posts: 24
Rep Power: 12 |
Quote:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2112 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type hePsiThermo; mixture reactingMixture; transport sutherland; thermo janaf; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } mixture { specie { nMoles 1; molWeight 28.97; } thermodynamics { Tlow 200; Thigh 5000; Tcommon 1000; Hf 0; } transport { As 1.67212e-6; Ts 170.672; } CHEMKINFile "chem.inp"; CHEMKINThermoFile "therm.dat"; } species ( O2 { molWeight 32.0; thermodynamics { Tlow 200; Thigh 5000; Tcommon 1000; Hf 0; } transport { As 1.67212e-6; Ts 170.672; } } H2 { molWeight 2.016; thermodynamics { Tlow 200; Thigh 5000; Tcommon 1000; Hf 0; } transport { As 1.67212e-6; Ts 170.672; } } H2O { molWeight 18.01528; thermodynamics { Tlow 200; Thigh 5000; Tcommon 1000; Hf -241.826; // Standard enthalpy of formation in kJ/mol } transport { As 1.67212e-6; Ts 170.672; } } N2 { molWeight 28.0134; thermodynamics { Tlow 200; Thigh 5000; Tcommon 1000; Hf 0; } transport { As 1.67212e-6; Ts 170.672; } } ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // What do you think about that? |
||
June 11, 2024, 06:12 |
|
#12 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
This is what I was saying in my previous post. Your CHEMKINFile is inside the mixture dictionary:
Code:
mixture { specie { nMoles 1; molWeight 28.97; } thermodynamics { Tlow 200; Thigh 5000; Tcommon 1000; Hf 0; } transport { As 1.67212e-6; Ts 170.672; } CHEMKINFile "chem.inp"; CHEMKINThermoFile "therm.dat"; } Code:
mixture { specie { nMoles 1; molWeight 28.97; } thermodynamics { Tlow 200; Thigh 5000; Tcommon 1000; Hf 0; } transport { As 1.67212e-6; Ts 170.672; } } CHEMKINFile "chem.inp"; CHEMKINThermoFile "therm.dat"; |
|
June 11, 2024, 06:24 |
|
#13 | |
New Member
Rohmawati Iis
Join Date: Apr 2014
Posts: 24
Rep Power: 12 |
Quote:
|
||
June 11, 2024, 06:41 |
|
#14 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Alright, I just tried myself.
It is important to carefully read the error messages. You initial error message states: Code:
--> FOAM FATAL IO ERROR: (openfoam-2312 patch=240220) Entry 'CHEMKINFile' not found in dictionary "/home/ishrein/OpenFOAM/ishrein-v2312/run/combCoarse/constant/thermophysicalProperties" Code:
--> FOAM FATAL IO ERROR: (openfoam-2312 patch=240220) Entry 'CHEMKINTransportFile' not found in dictionary "/home/ishrein/OpenFOAM/ishrein-v2312/run/combCoarse/constant/thermophysicalProperties" |
|
June 18, 2024, 23:30 |
|
#15 |
New Member
Rohmawati Iis
Join Date: Apr 2014
Posts: 24
Rep Power: 12 |
Thank you for your response,
After trying to inspect the Chemkin file problem, I found out that one of the causes is the sum of each chemical compound not being 1; it must be 1, isn't it? However, I also discovered another problem: Create time Create mesh for time = 0 PIMPLE: Operating solver in PISO mode Reading thermophysical properties Selecting thermodynamics package { type hePsiThermo; mixture reactingMixture; transport sutherland; thermo janaf; energy sensibleEnthalpy; equationOfState perfectGas; specie specie; } Selecting chemistryReader foamChemistryReader Reading field U Reading/calculating face flux field phi Creating turbulence model. Selecting turbulence model type laminar Selecting laminar stress model Stokes Creating reaction model Selecting combustion model laminar Selecting chemistry solver { solver EulerImplicit; method standard; } StandardChemistryModel: Number of species = 5 and reactions = 1 using integrated reaction rate Creating field dpdt Creating field kinetic energy K No MRF models present No finite volume options present Courant Number mean: 0 max: 0 Starting time loop BilgerMixtureFraction BilgerMixtureFraction1: Courant Number mean: 0 max: 0 deltaT = 0.120482 Time = 0.120482 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 PIMPLE: iteration 1 [stack trace] ============= #1 Foam::sigFpe::sigHandler(int) in /usr/lib/openfoam/openfoam2312/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/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so #4 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so #5 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so #6 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so #7 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so #8 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libcompressibleTurbulenceModels.so #9 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/bin/reactingFoam #10 ? in /lib/x86_64-linux-gnu/libc.so.6 #11 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 #12 ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/bin/reactingFoam ============= Floating point exception Could you give me some suggestions as to why I experienced these problems? Thank you in advance. Best regards, Ir |
|
June 19, 2024, 04:39 |
|
#16 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
This kind of error usually happens when there is some bad math happening. Typically trying to divide by 0, which might be what's happening here. Now the question is why is it happening? The crash is happening when the solver is supposed to solve the velocity and the error message mentions turbulence libraries, so it's most probably related to one of these things. Since it is crashing at the first iteration, first thing to do is to check your boundary conditions to make sure there is nothing wrong with the initialization and conditions defined. |
|
June 24, 2024, 03:38 |
|
#17 |
New Member
Rohmawati Iis
Join Date: Apr 2014
Posts: 24
Rep Power: 12 |
Hello Yann,
I tried to check the initialization and its boundary condition for days but it didn't work out well. Could you give me some suggestions about that? Here is the initialization and its boundary condition. 1. Velocity (U) FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type fixedValue; value uniform (1 0 0); } outlet { type zeroGradient; } top_wall { type noSlip; } bottom_wall { type noSlip; } } 2. Pressure FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { bottom_wall { type zeroGradient; } inlet { type zeroGradient; } top_wall { type zeroGradient; } outlet { type fixedValue; value uniform 0; } } 3. Temperature FoamFile { version 2.0; format ascii; class volScalarField; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 300; boundaryField { inlet { type fixedValue; value uniform 300; } outlet { type zeroGradient; } top_wall { type zeroGradient; } bottom_wall { type zeroGradient; } } 4. k */ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.005; boundaryField { bottom_wall { type kqRWallFunction; value uniform 0.1; } top_wall { type kqRWallFunction; value uniform 0.1; } inlet { type fixedValue; value uniform 0.1; } outlet { type zeroGradient; } } 5. epsilon FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -3 0 0 0 0]; internalField uniform 0.01; // Adjust initial turbulence dissipation rate as required boundaryField { bottom_wall { type epsilonWallFunction; value uniform 0.1; } top_wall { type epsilonWallFunction; value uniform 0.1; } inlet { type fixedValue; value uniform 0.1; } outlet { type zeroGradient; } } 6. controlDict FoamFile { version 2.0; format ascii; class dictionary; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application reactingFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 100; deltaT 1; writeControl timeStep; writeInterval 1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable yes; maxCo 0.5; adjustTimeStep yes; debugSwitches { default 1; general 1; } 7. fvSchemes FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(U) cellLimited Gauss linear 1; } divSchemes { default none; div(phi,U) Gauss linearUpwind grad(U); div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } 8. fvSolution FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver PCG; preconditioner DIC; tolerance 1e-06; relTol 0; } U { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-05; relTol 0.1; } "(k|epsilon|omega)" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-05; relTol 0.1; } } PISO { nCorrectors 2; nNonOrthogonalCorrectors 0; } Thank you in advance. |
|
June 24, 2024, 04:41 |
|
#18 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
Try setting an absolute pressure instead of 0. Yann |
|
July 17, 2024, 17:46 |
|
#19 |
New Member
Rohmawati Iis
Join Date: Apr 2014
Posts: 24
Rep Power: 12 |
Hello Yann,
Finally, I decided to adopt the tutorial case of 'counterFlowFlame2D' with the reactingFoam solver. The domain is cylindrical with boundary conditions as follows: top wall (noSlip), bottom wall (noSlip), side wall (inletOutlet), and an inlet located at the center of the top wall. The flow is injected through the inlet, and no flow should exit the domain. I have already performed the simulation, but it appears that the flow was exiting through the bottom wall. Here are the initial conditions for U, T, and p: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2312 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type turbulentInlet; fluctuationScale (0.05 0.05 0.05); referenceField uniform (0 0 1); alpha 1; value uniform (0 0 1); } outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } bottom_wall { type noSlip; } top_wall { type fixedValue; value uniform (0 0 0); } spray { type fixedValue; value uniform (0 0 1); } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2312 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 300; boundaryField { inlet { type fixedValue; value uniform 300; } outlet { type zeroGradient; } bottom_wall { type fixedValue; value uniform 373; } top_wall { type fixedValue; value uniform 373; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2312 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 101325; boundaryField { inlet { type zeroGradient; } outlet { type totalPressure; p0 $internalField; } bottom_wall { type zeroGradient; } top_wall { type zeroGradient; } } // ************************************************** *********************** // Do you have any suggestions for ensuring that there is no flow exiting from the bottom wall, so the flow impinges on the wall? I really appreciate your help. Thank you. |
|
July 18, 2024, 09:04 |
|
#20 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
Not sure what's wrong, your BCs look fine to me. Yann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sandia Flame D OpenFoam tutorial case - bad result? | Brandani | OpenFOAM Programming & Development | 8 | January 18, 2022 14:29 |
use latest time of a reconstructed case in another case in openfoam | mb.pejvak | Main CFD Forum | 0 | October 4, 2019 11:23 |
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology | wyldckat | OpenFOAM | 17 | November 10, 2017 16:54 |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 15:24 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |