diff --git a/docs/source/solvers/2D_evolving_jet_0.1ms.png b/docs/source/solvers/2D_evolving_jet_0.1ms.png new file mode 100644 index 000000000..80d0392e8 Binary files /dev/null and b/docs/source/solvers/2D_evolving_jet_0.1ms.png differ diff --git a/docs/source/solvers/Computational_domain.png b/docs/source/solvers/Computational_domain.png new file mode 100644 index 000000000..5fa00d55e Binary files /dev/null and b/docs/source/solvers/Computational_domain.png differ diff --git a/docs/source/solvers/dfLowMachFoam.rst b/docs/source/solvers/dfLowMachFoam.rst index f0778a868..d4653baf4 100644 --- a/docs/source/solvers/dfLowMachFoam.rst +++ b/docs/source/solvers/dfLowMachFoam.rst @@ -137,7 +137,47 @@ The developed 2D HIT are displayed in the figures below. Vuorinen, Ville, and K. Keskinen. "DNSLab: A gateway to turbulent flow simulation in Matlab." Computer Physics Communications 203 (2016): 278-289. +Two-Dimensional temporally evolving jet flame +---------------------------------------------------------- + +**Problem Description** + +2D planar temporally evolving jet flame is simulated here. Turbulent plane jets are prototypical free shear flows on which fundamental research can expand the overall understanding of turbulent flows. Here, we develope a two-dimensional temporally evolving turbulent jet, with considering transport and mixing processes of scalars in turbulent shear flows. + +The domain is initially filled with unburnt CH4/air mixture at the region where 7.5 mm < y < 8.5 mm and burnt gas CO2/H2O/N2 elsewhere. To initialize turbulent shear flow, the internal velocity field is generated from a jet flow simulation with turbulence generator. + +.. list-table:: Operating Conditions in Brief + :widths: 40 40 + :header-rows: 0 + + * - Computational Domain size (x) + - 16 mm * 16 mm + * - Initial Gas Temperature + - 900 K (unburnt gas), 2500 K (burnt gas) + +The figure below shows the computation domain and initial conditions. + +.. figure:: Computational_domain.png + :width: 500 + :align: center + Computational domain and initial conditions + +**Output** + +The temporally evolving jet flame are displayed in the figures below. + +.. figure:: 2D_evolving_jet_0.1ms.png + :width: 500 + :align: center + + Contours of temperature and Qdot at t = 0.1 ms + +**Reference** + +M.Saito, J. Xing, J. Nagao, R. Kurose. "Data-driven simulation of ammonia combustion using neural ordinary differential equations (NODE)." Applications in Energy and Combustion Science (2023): 100196. + + Three-Dimensional Reactive Taylor-Green Vortex --------------------------------------------------- diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/CH4.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/CH4.gz new file mode 100755 index 000000000..c89514a36 Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/CH4.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/CO2.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/CO2.gz new file mode 100755 index 000000000..1c40cb943 Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/CO2.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/H2O.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/H2O.gz new file mode 100755 index 000000000..394082253 Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/H2O.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/N2.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/N2.gz new file mode 100755 index 000000000..8430cddaf Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/N2.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/O2.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/O2.gz new file mode 100755 index 000000000..7919897db Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/O2.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/T.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/T.gz new file mode 100755 index 000000000..497068456 Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/T.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/U.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/U.gz new file mode 100755 index 000000000..0f020faa1 Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/U.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/Ydefault.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/Ydefault.gz new file mode 100755 index 000000000..de97eb3e1 Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/Ydefault.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/alphat.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/alphat.gz new file mode 100755 index 000000000..2a3d920bb Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/alphat.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/nut.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/nut.gz new file mode 100755 index 000000000..875abb538 Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/nut.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/p.gz b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/p.gz new file mode 100755 index 000000000..bef352a51 Binary files /dev/null and b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/0/p.gz differ diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/Allclean b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/Allclean new file mode 100755 index 000000000..2cd9e2246 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/Allclean @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +echo "Cleaning log.*" +rm log.* +echo "Cleaning processor*" +rm -r processor* +echo "Cleaning polyMesh/" +rm -r constant/polyMesh diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/Allrun b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/Allrun new file mode 100755 index 000000000..8cd1cbdd5 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/Allrun @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application=dfLowMachFoam + +runApplication blockMesh +runApplication decomposePar +runApplication mpirun -np 4 --allow-run-as-root $application -parallel diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/CanteraTorchProperties b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/CanteraTorchProperties new file mode 100755 index 000000000..afbfa61e2 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/CanteraTorchProperties @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 7 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object CanteraTorchProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +chemistry on; + +CanteraMechanismFile "drm19.yaml"; + +transportModel "Mix"; + +odeCoeffs +{ + "relTol" 1e-6; + "absTol" 1e-10; +} + +inertSpecie "N2"; + +splittingStrategy off; + +TorchSettings +{ + torch off;//on; + GPU on; + log on; + torchModel ""; + coresPerNode 4; +} + +loadbalancing +{ + active true; + log false; + algorithm allAverage;//headTail; +} + + +// ************************************************************************* // diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/combustionProperties b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/combustionProperties new file mode 100755 index 000000000..7418500d0 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/combustionProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 7 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel laminar; + +// ************************************************************************* // diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/thermophysicalProperties b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/thermophysicalProperties new file mode 100755 index 000000000..f82ee9785 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/thermophysicalProperties @@ -0,0 +1,18 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.4.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// ************************************************************************* // diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/turbulenceProperties b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/turbulenceProperties new file mode 100755 index 000000000..ab70e94d3 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 7 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/drm19.yaml b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/drm19.yaml new file mode 120000 index 000000000..6aed11e7f --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/drm19.yaml @@ -0,0 +1 @@ +../../../../../mechanisms/CH4/drm19.yaml \ No newline at end of file diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/blockMeshDict b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/blockMeshDict new file mode 100755 index 000000000..38710de65 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/blockMeshDict @@ -0,0 +1,126 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 7 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.001; + +vertices #codeStream +{ + codeInclude + #{ + #include "pointField.H" + #}; + + code + #{ + pointField points(8); + points[0] = point(0, 0, -0.5); + points[1] = point(16, 0, -0.5); + points[2] = point(16, 7.5, -0.5); + points[3] = point(0, 7.5, -0.5); + points[4] = point(0, 8.5, -0.5); + points[5] = point(16, 8.5, -0.5); + points[6] = point(16, 16, -0.5); + points[7] = point(0, 16, -0.5); + + // Duplicate z points + label sz = points.size(); + points.setSize(2*sz); + for (label i = 0; i < sz; i++) + { + const point& pt = points[i]; + points[i+sz] = point(pt.x(), pt.y(), -pt.z()); + } + + os << points; + #}; +}; + +blocks +( + hex (0 1 2 3 8 9 10 11) (800 250 1) + simpleGrading + ( + 1 + ( + (0.6 0.4 0.25) + (0.4 0.6 1) + ) + 1 + ) + hex (3 2 5 4 11 10 13 12) (800 50 1) simpleGrading (1 1 1) + hex (4 5 6 7 12 13 14 15) (800 250 1) + simpleGrading + ( + 1 + ( + (0.4 0.6 1) + (0.6 0.4 4) + ) + 1 + ) +); + +edges +( +); + +boundary +( + left + { + type cyclic; + neighbourPatch right; + faces + ( + (0 3 11 8) + (3 4 12 11) + (4 7 15 12) + ); + } + right + { + type cyclic; + neighbourPatch left; + faces + ( + (1 2 10 9) + (2 5 13 10) + (5 6 14 13) + ); + } + top + { + type patch; + faces + ( + (7 6 14 15) + ); + } + down + { + type patch; + faces + ( + (0 1 9 8) + ); + } +); + +// mergePatchPairs +// ( +// ); + +// ************************************************************************* // diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/controlDict b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/controlDict new file mode 100755 index 000000000..97bba0bf0 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/controlDict @@ -0,0 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 7 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application dfLowMachFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 1.0e-4; + +deltaT 1e-9; + +writeControl adjustableRunTime; + +writeInterval 1e-5; + +purgeWrite 0; + +writeFormat ascii; + +// writePrecision 6; + +writeCompression on; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep yes; + +maxCo 0.5; + +maxDeltaT 1e-4; + + +// ************************************************************************* // diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/decomposeParDict b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/decomposeParDict new file mode 100755 index 000000000..7900710b3 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/decomposeParDict @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 7 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 32; + +method simple; + +simpleCoeffs +{ + n (8 4 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (1 1 1); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/fvSchemes b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/fvSchemes new file mode 100755 index 000000000..2f2cf3dd9 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/fvSchemes @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 7 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss linear; + div(phi,Yi) Gauss limitedLinear01 1; + div(phi,h) Gauss limitedLinear 1; + div(phi,ha) Gauss limitedLinear 1; + div(phi,K) Gauss limitedLinear 1; + div(phid,p) Gauss limitedLinear 1; + div(phi,epsilon) Gauss limitedLinear 1; + div(phi,Yi_h) Gauss limitedLinear01 1; + div(phi,k) Gauss limitedLinear 1; + div(hDiffCorrFlux) Gauss cubic; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + +// ************************************************************************* // diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/fvSolution b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/fvSolution new file mode 100755 index 000000000..2ff9eac58 --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/fvSolution @@ -0,0 +1,89 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 7 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "rho.*" + { + solver diagonal; + } + + p + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 20; + agglomerator faceAreaPair; + mergeLevels 1; + } + + pFinal + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 20; + agglomerator faceAreaPair; + mergeLevels 1; + } + + "(U|ha|k|epsilon)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-7; + relTol 0.01; + } + + "(U|ha|k|epsilon)Final" + { + $U; + tolerance 1e-7; + relTol 0.01; + } + + "Yi" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-7; + relTol 0.01; + } + "YiFinal" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-7; + relTol 0.01; + } +} + +PIMPLE +{ + momentumPredictor yes; + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + + +// ************************************************************************* // diff --git a/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/setFieldsDict b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/setFieldsDict new file mode 100755 index 000000000..4c5f6557a --- /dev/null +++ b/examples/dfLowMachFoam/twoD_temporally_evolving_jet/system/setFieldsDict @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 7 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue T 2500 + volScalarFieldValue CH4 0 + volScalarFieldValue H2O 0.1239 + volScalarFieldValue CO2 0.1514 + volScalarFieldValue O2 0 + volScalarFieldValue N2 0.7247 + +); + +regions +( + boxToCell + { + box (0 0.0075 -0.0005) (0.016 0.0085 0.0005); + fieldValues + ( + volScalarFieldValue T 900 + volScalarFieldValue CH4 0.0552 + volScalarFieldValue H2O 0 + volScalarFieldValue CO2 0 + volScalarFieldValue O2 0.2201 + volScalarFieldValue N2 0.7247 + ); + } +); + + +// ************************************************************************* //