From fbfcc4168ca49bd80b6d099d6d9f0ae31e3373d4 Mon Sep 17 00:00:00 2001 From: circlexiang <2100011009@stu.pku.edu.cn> Date: Thu, 29 May 2025 18:43:57 +0800 Subject: [PATCH 1/6] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 2cd03baf..89e3fd26 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,13 @@ The neural network models used in the tutorial examples can be found at– [AIS Detailed guide for installation and tutorials is available on [our documentation website](https://deepflame.deepmodeling.com). ## Features +New in v1.6 (2025/5/29): +- Provide a new boundary condition, totalFlowRateAdvectiveDiffusion (adopted from OpenFOAM v7), which accounts for diffusion effects at the boundary +- Develop a new solver, `dfBuoyancyFoam`(adopted from fireFoam in OpenFOAM v7), a transient, compressible solver designed to model turbulent reacting flows incorporating buoyancy effects +- Add radiation models, which are integrated into the current `dfBuoyancyFoam` solver, and can be incorporated into other solvers if needed +- Add new combustion models (including infinitelyFastChemistry and eddyDissipationModel) to the `dfBuoyancyFoam` solver +- Imply DeepFlame on Arm architecture platforms + New in v1.5 (2025/1/8): - Provide a new boundary condition, totalFlowRateAdvectiveDiffusion (adopted from OpenFOAM v7), which accounts for diffusion effects at the boundary - Develop a new solver, `dfBuoyancyFoam`(adopted from fireFoam in OpenFOAM v7), a transient, compressible solver designed to model turbulent reacting flows incorporating buoyancy effects From 2a75838690336bdfe9ad15a1fffb6cae4afb5957 Mon Sep 17 00:00:00 2001 From: circlexiang <2100011009@stu.pku.edu.cn> Date: Fri, 30 May 2025 17:19:12 +0800 Subject: [PATCH 2/6] Update README.md --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 89e3fd26..84c9c8d4 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,11 @@ The neural network models used in the tutorial examples can be found at– [AIS Detailed guide for installation and tutorials is available on [our documentation website](https://deepflame.deepmodeling.com). ## Features -New in v1.6 (2025/5/29): -- Provide a new boundary condition, totalFlowRateAdvectiveDiffusion (adopted from OpenFOAM v7), which accounts for diffusion effects at the boundary -- Develop a new solver, `dfBuoyancyFoam`(adopted from fireFoam in OpenFOAM v7), a transient, compressible solver designed to model turbulent reacting flows incorporating buoyancy effects -- Add radiation models, which are integrated into the current `dfBuoyancyFoam` solver, and can be incorporated into other solvers if needed -- Add new combustion models (including infinitelyFastChemistry and eddyDissipationModel) to the `dfBuoyancyFoam` solver -- Imply DeepFlame on Arm architecture platforms +New in v1.6 (2025/5/30): +- Add a new solver, dfSteadyFoam, a transient compressible flow solver for HVAC and similar applications. It supports turbulence modeling, optional mesh motion and topology changes, and uses the flexible PIMPLE (PISO-SIMPLE) algorithm for both time-resolved and pseudo-transient simulations +- Update energy formulation: replace hai(i) with hei(i) to support multiple energy types (ha, hs, ea), enabling flexible selection of enthalpy or internal energy for thermochemical modeling +- Improve install.sh by displaying system architecture (e.g., x86_64) after build for clearer platform information +- Switch to sphinx-book-theme and update documentation build environment (Ubuntu 24.04, Python 3.12) for better appearance and compatibility New in v1.5 (2025/1/8): - Provide a new boundary condition, totalFlowRateAdvectiveDiffusion (adopted from OpenFOAM v7), which accounts for diffusion effects at the boundary From f6b8904482eff5ab0ec47489da57b747239974e4 Mon Sep 17 00:00:00 2001 From: circlexiang <2100011009@stu.pku.edu.cn> Date: Fri, 30 May 2025 17:49:07 +0800 Subject: [PATCH 3/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 84c9c8d4..8ce5c786 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ Detailed guide for installation and tutorials is available on [our documentation ## Features New in v1.6 (2025/5/30): -- Add a new solver, dfSteadyFoam, a transient compressible flow solver for HVAC and similar applications. It supports turbulence modeling, optional mesh motion and topology changes, and uses the flexible PIMPLE (PISO-SIMPLE) algorithm for both time-resolved and pseudo-transient simulations -- Update energy formulation: replace hai(i) with hei(i) to support multiple energy types (ha, hs, ea), enabling flexible selection of enthalpy or internal energy for thermochemical modeling +- Add a new solver, dfSteadyFoam, a steady-state compressible flow solver for HVAC and similar applications. It supports turbulence, optional mesh motion and topology changes, and uses the flexible PIMPLE algorithm to efficiently compute steady solutions +- Extend energy model to support sensible enthalpy (hs) in addition to absolute enthalpy (ha) and internal energy (ea). Temperature can now be computed independently of Cantera via in-code Newton iteration, improving flexibility and removing external dependencies - Improve install.sh by displaying system architecture (e.g., x86_64) after build for clearer platform information - Switch to sphinx-book-theme and update documentation build environment (Ubuntu 24.04, Python 3.12) for better appearance and compatibility From b70182f630859e85acddd85053e66eea0ec86b7f Mon Sep 17 00:00:00 2001 From: circlexiang <2100011009@stu.pku.edu.cn> Date: Fri, 30 May 2025 17:59:46 +0800 Subject: [PATCH 4/6] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8ce5c786..31c247e6 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ New in v1.6 (2025/5/30): - Extend energy model to support sensible enthalpy (hs) in addition to absolute enthalpy (ha) and internal energy (ea). Temperature can now be computed independently of Cantera via in-code Newton iteration, improving flexibility and removing external dependencies - Improve install.sh by displaying system architecture (e.g., x86_64) after build for clearer platform information - Switch to sphinx-book-theme and update documentation build environment (Ubuntu 24.04, Python 3.12) for better appearance and compatibility +- Add 2D Riemann problem example case New in v1.5 (2025/1/8): - Provide a new boundary condition, totalFlowRateAdvectiveDiffusion (adopted from OpenFOAM v7), which accounts for diffusion effects at the boundary From ea8beec7d5cc5716f0ecc37daf7ca8a5861fac81 Mon Sep 17 00:00:00 2001 From: circlexiang <2100011009@stu.pku.edu.cn> Date: Mon, 2 Jun 2025 13:01:01 +0800 Subject: [PATCH 5/6] add twoD_RiemannProblem --- .../twoD_RiemannProblem/0_orig/N2 | 46 ++++ .../twoD_RiemannProblem/0_orig/O2 | 46 ++++ .../twoD_RiemannProblem/0_orig/T | 46 ++++ .../twoD_RiemannProblem/0_orig/U | 46 ++++ .../twoD_RiemannProblem/0_orig/Ydefault | 46 ++++ .../twoD_RiemannProblem/0_orig/p | 46 ++++ .../twoD_RiemannProblem/Allclean | 11 + .../twoD_RiemannProblem/Allrun | 13 + .../twoD_RiemannProblem/H2_Ja.yaml | 256 ++++++++++++++++++ .../constant/CanteraTorchProperties | 47 ++++ .../constant/combustionProperties | 20 ++ .../twoD_RiemannProblem/constant/g | 22 ++ .../constant/sprayCloudProperties | 26 ++ .../constant/thermophysicalProperties | 27 ++ .../constant/turbulenceProperties | 21 ++ .../twoD_RiemannProblem/system/blockMeshDict | 90 ++++++ .../twoD_RiemannProblem/system/controlDict | 57 ++++ .../system/decomposeParDict | 38 +++ .../twoD_RiemannProblem/system/fvSchemes | 60 ++++ .../twoD_RiemannProblem/system/fvSolution | 67 +++++ .../twoD_RiemannProblem/system/setFieldsDict | 59 ++++ 21 files changed, 1090 insertions(+) create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/N2 create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/O2 create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/T create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/U create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/Ydefault create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/p create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/Allclean create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/Allrun create mode 100644 examples/dfHighSpeedFoam/twoD_RiemannProblem/H2_Ja.yaml create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/CanteraTorchProperties create mode 100644 examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/combustionProperties create mode 100644 examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/g create mode 100644 examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/sprayCloudProperties create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/thermophysicalProperties create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/turbulenceProperties create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/system/blockMeshDict create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/system/controlDict create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/system/decomposeParDict create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/system/fvSchemes create mode 100755 examples/dfHighSpeedFoam/twoD_RiemannProblem/system/fvSolution create mode 100644 examples/dfHighSpeedFoam/twoD_RiemannProblem/system/setFieldsDict diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/N2 b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/N2 new file mode 100755 index 00000000..7a274e66 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/N2 @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 volScalarField; + location "0"; + object N2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.79; + +boundaryField +{ + inlet + { + type zeroGradient; + } + top + { + type zeroGradient; + } + bottom + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/O2 b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/O2 new file mode 100755 index 00000000..1861bb7d --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/O2 @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 volScalarField; + location "0"; + object O2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.21; + +boundaryField +{ + inlet + { + type zeroGradient; + } + top + { + type zeroGradient; + } + bottom + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/T b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/T new file mode 100755 index 00000000..c6d559ea --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/T @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 348.4; // to be overwritten + +boundaryField +{ + inlet + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + bottom + { + type zeroGradient; + } + top + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/U b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/U new file mode 100755 index 00000000..5eaeed51 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/U @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type zeroGradient; + } + top + { + type zeroGradient; + } + bottom + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/Ydefault b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/Ydefault new file mode 100755 index 00000000..e2015dce --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/Ydefault @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 volScalarField; + location "0"; + object Ydefault; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + inlet + { + type zeroGradient; + } + top + { + type zeroGradient; + } + bottom + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/p b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/p new file mode 100755 index 00000000..85f75970 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/0_orig/p @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 150000; // to be overwritten + +boundaryField +{ + inlet + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + bottom + { + type zeroGradient; + } + top + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/Allclean b/examples/dfHighSpeedFoam/twoD_RiemannProblem/Allclean new file mode 100755 index 00000000..03b04309 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/Allclean @@ -0,0 +1,11 @@ +#!/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 +echo "Cleaning 0/" +rm -r 0 \ No newline at end of file diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/Allrun b/examples/dfHighSpeedFoam/twoD_RiemannProblem/Allrun new file mode 100755 index 00000000..38f0f795 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/Allrun @@ -0,0 +1,13 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application=dfHighSpeedFoam + +cp -r 0_orig/ 0/ +runApplication blockMesh +runApplication setFields +runApplication decomposePar +runApplication mpirun -np 50 --allow-run-as-root $application -parallel diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/H2_Ja.yaml b/examples/dfHighSpeedFoam/twoD_RiemannProblem/H2_Ja.yaml new file mode 100644 index 00000000..1711869d --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/H2_Ja.yaml @@ -0,0 +1,256 @@ +generator: ctml2yaml +cantera-version: 2.6.0 +date: Wed, 24 May 2023 11:11:40 +0800 +input-files: [H2_Ja.xml] + +phases: +- name: gas + elements: [O, H, C, N] + species: [H, H2, O, O2, OH, H2O, N2, HO2, H2O2] + thermo: ideal-gas + transport: mixture-averaged + kinetics: gas + reactions: all + state: {T: 300.0 K, P: 1.01325e+05 Pa} + +species: +- name: H + composition: {H: 1.0} + note: L7/88 + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 3500.0] + data: + - [2.5, 7.05332819e-13, -1.99591964e-15, 2.30081632e-18, -9.27732332e-22, 2.54736599e+04, + -0.446682853] + - [2.50000001, -2.30842973e-11, 1.61561948e-14, -4.73515235e-18, 4.98197357e-22, + 2.54736599e+04, -0.446682914] + transport: + model: gas + geometry: atom + well-depth: 145.0 + diameter: 2.05 + dipole: 0.0 + polarizability: 0.0 + rotational-relaxation: 0.0 + dispersion-coefficient: 0.0 + quadrupole-polarizability: 0.0 +- name: H2 + composition: {H: 2.0} + note: TPIS78 + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 3500.0] + data: + - [2.34433112, 7.98052075e-03, -1.9478151e-05, 2.01572094e-08, -7.37611761e-12, + -917.935173, 0.683010238] + - [3.3372792, -4.94024731e-05, 4.99456778e-07, -1.79566394e-10, 2.00255376e-14, + -950.158922, -3.20502331] + transport: + model: gas + geometry: linear + well-depth: 38.0 + diameter: 2.92 + dipole: 0.0 + polarizability: 0.79 + rotational-relaxation: 280.0 + dispersion-coefficient: 0.0 + quadrupole-polarizability: 0.0 +- name: O + composition: {O: 1.0} + note: L1/90 + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 3500.0] + data: + - [3.1682671, -3.27931884e-03, 6.64306396e-06, -6.12806624e-09, 2.11265971e-12, + 2.91222592e+04, 2.05193346] + - [2.56942078, -8.59741137e-05, 4.19484589e-08, -1.00177799e-11, 1.22833691e-15, + 2.92175791e+04, 4.78433864] + transport: + model: gas + geometry: atom + well-depth: 80.0 + diameter: 2.75 + dipole: 0.0 + polarizability: 0.0 + rotational-relaxation: 0.0 + dispersion-coefficient: 0.0 + quadrupole-polarizability: 0.0 +- name: O2 + composition: {O: 2.0} + note: TPIS89 + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 3500.0] + data: + - [3.78245636, -2.99673416e-03, 9.84730201e-06, -9.68129509e-09, 3.24372837e-12, + -1063.94356, 3.65767573] + - [3.28253784, 1.48308754e-03, -7.57966669e-07, 2.09470555e-10, -2.16717794e-14, + -1088.45772, 5.45323129] + transport: + model: gas + geometry: linear + well-depth: 107.4 + diameter: 3.458 + dipole: 0.0 + polarizability: 1.6 + rotational-relaxation: 3.8 + dispersion-coefficient: 0.0 + quadrupole-polarizability: 0.0 +- name: OH + composition: {H: 1.0, O: 1.0} + note: S9/01 + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 6000.0] + data: + - [4.12530561, -3.22544939e-03, 6.52764691e-06, -5.79853643e-09, 2.06237379e-12, + 3381.53812, -0.69043296] + - [2.86472886, 1.05650448e-03, -2.59082758e-07, 3.05218674e-11, -1.33195876e-15, + 3718.85774, 5.70164073] + transport: + model: gas + geometry: linear + well-depth: 80.0 + diameter: 2.75 + dipole: 0.0 + polarizability: 0.0 + rotational-relaxation: 0.0 + dispersion-coefficient: 0.0 + quadrupole-polarizability: 0.0 +- name: H2O + composition: {H: 2.0, O: 1.0} + note: L8/89 + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 3500.0] + data: + - [4.19864056, -2.0364341e-03, 6.52040211e-06, -5.48797062e-09, 1.77197817e-12, + -3.02937267e+04, -0.849032208] + - [3.03399249, 2.17691804e-03, -1.64072518e-07, -9.7041987e-11, 1.68200992e-14, + -3.00042971e+04, 4.9667701] + transport: + model: gas + geometry: nonlinear + well-depth: 572.4 + diameter: 2.605 + dipole: 1.844 + polarizability: 0.0 + rotational-relaxation: 4.0 + dispersion-coefficient: 0.0 + quadrupole-polarizability: 0.0 +- name: N2 + composition: {N: 2.0} + note: '121286' + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 5000.0] + data: + - [3.298677, 1.4082404e-03, -3.963222e-06, 5.641515e-09, -2.444854e-12, -1020.8999, + 3.950372] + - [2.92664, 1.4879768e-03, -5.68476e-07, 1.0097038e-10, -6.753351e-15, -922.7977, + 5.980528] + transport: + model: gas + geometry: linear + well-depth: 97.53 + diameter: 3.621 + dipole: 0.0 + polarizability: 1.76 + rotational-relaxation: 4.0 + dispersion-coefficient: 0.0 + quadrupole-polarizability: 0.0 +- name: HO2 + composition: {H: 1.0, O: 2.0} + note: L5/89 + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 3500.0] + data: + - [4.30179801, -4.74912051e-03, 2.11582891e-05, -2.42763894e-08, 9.29225124e-12, + 294.80804, 3.71666245] + - [4.0172109, 2.23982013e-03, -6.3365815e-07, 1.1424637e-10, -1.07908535e-14, + 111.856713, 3.78510215] + transport: + model: gas + geometry: nonlinear + well-depth: 107.4 + diameter: 3.458 + dipole: 0.0 + polarizability: 0.0 + rotational-relaxation: 1.0 + dispersion-coefficient: 0.0 + quadrupole-polarizability: 0.0 +- name: H2O2 + composition: {H: 2.0, O: 2.0} + note: L7/88 + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 3500.0] + data: + - [4.27611269, -5.42822417e-04, 1.67335701e-05, -2.15770813e-08, 8.62454363e-12, + -1.77025821e+04, 3.43505074] + - [4.16500285, 4.90831694e-03, -1.90139225e-06, 3.71185986e-10, -2.87908305e-14, + -1.78617877e+04, 2.91615662] + transport: + model: gas + geometry: nonlinear + well-depth: 107.4 + diameter: 3.458 + dipole: 0.0 + polarizability: 0.0 + rotational-relaxation: 3.8 + dispersion-coefficient: 0.0 + quadrupole-polarizability: 0.0 + +reactions: +- equation: H2 + O2 <=> HO2 + H + rate-constant: {A: 1.0e+11, b: 0.0, Ea: 5.6e+04 cal/mol} +- equation: H + O2 <=> OH + O + rate-constant: {A: 2.6e+11, b: 0.0, Ea: 1.68e+04 cal/mol} +- equation: O + H2 <=> OH + H + rate-constant: {A: 1.8e+07, b: 1.0, Ea: 8900.0 cal/mol} +- equation: OH + H2 <=> H2O + H + rate-constant: {A: 2.2e+10, b: 0.0, Ea: 5150.0 cal/mol} +- equation: OH + OH <=> H2O + O + rate-constant: {A: 6.3e+09, b: 0.0, Ea: 1090.0 cal/mol} +- equation: H + OH + M <=> H2O + M + type: three-body + rate-constant: {A: 2.2e+16, b: -2.0, Ea: 0.0 cal/mol} + efficiencies: {H2O: 6.0} +- equation: H + H + M <=> H2 + M + type: three-body + rate-constant: {A: 6.4e+11, b: -1.0, Ea: 0.0 cal/mol} + efficiencies: {H2: 2.0, H2O: 6.0} +- equation: H + O + M <=> OH + M + type: three-body + rate-constant: {A: 6.0e+10, b: -0.6, Ea: 0.0 cal/mol} + efficiencies: {H2O: 6.0} +- equation: H + O2 + M <=> HO2 + M + type: three-body + rate-constant: {A: 2.1e+09, b: 0.0, Ea: -1000.0 cal/mol} + efficiencies: {H2: 2.0, H2O: 6.0} +- equation: HO2 + H <=> OH + OH + rate-constant: {A: 1.4e+11, b: 0.0, Ea: 1080.0 cal/mol} +- equation: HO2 + H <=> H2O + O + rate-constant: {A: 1.0e+10, b: 0.0, Ea: 1080.0 cal/mol} +- equation: HO2 + O <=> O2 + OH + rate-constant: {A: 1.5e+10, b: 0.0, Ea: 950.0 cal/mol} +- equation: HO2 + OH <=> H2O + O2 + rate-constant: {A: 8.0e+09, b: 0.0, Ea: 0.0 cal/mol} +- equation: 2 HO2 <=> H2O2 + O2 + rate-constant: {A: 2.0e+09, b: 0.0, Ea: 0.0 cal/mol} +- equation: H + H2O2 <=> H2 + HO2 + rate-constant: {A: 1.4e+09, b: 0.0, Ea: 3600.0 cal/mol} +- equation: O + H2O2 <=> OH + HO2 + rate-constant: {A: 1.4e+10, b: 0.0, Ea: 6400.0 cal/mol} +- equation: OH + H2O2 <=> H2O + HO2 + rate-constant: {A: 6.1e+09, b: 0.0, Ea: 1430.0 cal/mol} +- equation: H2O2 + M <=> OH + OH + M + type: three-body + rate-constant: {A: 1.2e+14, b: 0.0, Ea: 4.55e+04 cal/mol} + efficiencies: {H2O: 15.0} +- equation: O + O + M <=> O2 + M + type: three-body + rate-constant: {A: 6.0e+07, b: 0.0, Ea: -1800.0 cal/mol} diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/CanteraTorchProperties b/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/CanteraTorchProperties new file mode 100755 index 00000000..999689df --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/CanteraTorchProperties @@ -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 "constant"; + object CanteraTorchProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +chemistry on; + +CanteraMechanismFile "H2_Ja.yaml"; + +transportModel "Mix"; + +odeCoeffs +{ + "relTol" 1e-6; + "absTol" 1e-10; +} + +inertSpecie "N2"; + +splittingStrategy off; + +TorchSettings +{ + torch off; +} + +loadbalancing +{ + active true; + log false; + algorithm allAverage;//headTail; +} + + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/combustionProperties b/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/combustionProperties new file mode 100644 index 00000000..7418500d --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/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/dfHighSpeedFoam/twoD_RiemannProblem/constant/g b/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/g new file mode 100644 index 00000000..28cfc236 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- 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 binary; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/sprayCloudProperties b/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/sprayCloudProperties new file mode 100644 index 00000000..2010a885 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/sprayCloudProperties @@ -0,0 +1,26 @@ +/*--------------------------------*- 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 binary; + class dictionary; + location "constant"; + object SprayCloudProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solution +{ + active false; + coupled false; + transient no; + cellValueSourceCorrection off; +} + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/thermophysicalProperties b/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/thermophysicalProperties new file mode 100755 index 00000000..885e2ee9 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/thermophysicalProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- 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 thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +inviscid true; + +liquids +{ +} + +solids +{} + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/turbulenceProperties b/examples/dfHighSpeedFoam/twoD_RiemannProblem/constant/turbulenceProperties new file mode 100755 index 00000000..ab70e94d --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/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/dfHighSpeedFoam/twoD_RiemannProblem/system/blockMeshDict b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/blockMeshDict new file mode 100755 index 00000000..87cbc1bd --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/blockMeshDict @@ -0,0 +1,90 @@ +/*--------------------------------*- 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 1; + +vertices +( + (0 0 0) + (1 0 0) + (1 1 0) + (0 1 0) + (0 0 1) + (1 0 1) + (1 1 1) + (0 1 1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (2000 2000 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + outlet + { + type patch; + faces + ( + (1 2 6 5) + ); + } + bottom + { + type patch; + faces + ( + (0 1 5 4) + ); + } + top + { + type patch; + faces + ( + (3 7 6 2) + + ); + } + frontAndBack + { + type empty; + faces + ( + (5 6 7 4) + (0 3 2 1) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/controlDict b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/controlDict new file mode 100755 index 00000000..f3308ed8 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/controlDict @@ -0,0 +1,57 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +libs ( + "libdfDynamicFvMesh.so" + ); + +application dfHighSpeedFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.1; + +deltaT 1e-08; + +writeControl adjustableRunTime; + +writeInterval 1e-04; + +cycleWrite 0; + +writeFormat ascii; + +writePrecision 8; + +writeCompression on; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep yes; + +maxCo 0.2; + +maxDeltaT 1; + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/decomposeParDict b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/decomposeParDict new file mode 100755 index 00000000..15fa76e7 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/decomposeParDict @@ -0,0 +1,38 @@ +/*--------------------------------*- 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 200; + +method simple; + +simpleCoeffs +{ + n (200 1 1); + delta 0; +} + +constraints +{ + dfRefinementHistory + { + //- Decompose cells such that all cell originating from single cell + // end up on same processor + type dfRefinementHistory; + } +} + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/fvSchemes b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/fvSchemes new file mode 100755 index 00000000..0202b899 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +fluxScheme HLLC; + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(tauMC) Gauss linear; + div(hDiffCorrFlux) Gauss cubic; + div(phi,Yi_h) Gauss vanLeer; +} + +laplacianSchemes +{ + default Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; + reconstruct(rho) Minmod; + reconstruct(U) MinmodV; + reconstruct(T) Minmod; + reconstruct(Yi) Minmod; + reconstruct(p) Minmod; + reconstruct(c) Minmod; +} + +snGradSchemes +{ + default uncorrected; +} + + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/fvSolution b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/fvSolution new file mode 100755 index 00000000..b9fb7f36 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/fvSolution @@ -0,0 +1,67 @@ +/*--------------------------------*- 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 +{ + U + { + //solver smoothSolver; + //smoother GaussSeidel; + //nSweeps 2; + //tolerance 1e-17; + //relTol 0; + + solver PBiCGStab; + preconditioner DIC; + tolerance 1e-11; + relTol 0; + } + + h + { + $U; + tolerance 1e-11; + relTol 0; + } + + ea + { + $U; + tolerance 1e-11; + relTol 0; + } + + "rho.*" + { + solver diagonal; + } + + "(O2|N2|Yi)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-11; + relTol 0; + } + +} + +CENTRAL +{ +} + +// ************************************************************************* // diff --git a/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/setFieldsDict b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/setFieldsDict new file mode 100644 index 00000000..90e01c97 --- /dev/null +++ b/examples/dfHighSpeedFoam/twoD_RiemannProblem/system/setFieldsDict @@ -0,0 +1,59 @@ +/*--------------------------------*- 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 +( + volVectorFieldValue U (0 0 0) + volScalarFieldValue T 348.4 // [K] + volScalarFieldValue p 150000 // [Pa] +); + +regions +( + boxToCell + { + box (0 0 0) (0.5 0.5 1); + fieldValues + ( + volScalarFieldValue T 73.2 // [K] + volScalarFieldValue p 2900 // + volVectorFieldValue U (381.2 381.2 0) + ); + } + boxToCell + { + box (0 0.5 0) (0.5 1 1); + fieldValues + ( + volScalarFieldValue T 196.4 // [K] + volScalarFieldValue p 30000 // + volVectorFieldValue U (381.6 0 0) + ); + } + boxToCell + { + box (0.5 0 0) (1 0.5 1); + fieldValues + ( + volScalarFieldValue T 196.4 // [K] + volScalarFieldValue p 30000 // + volVectorFieldValue U (0 381.6 0) + ); + } +); + + +// ************************************************************************* // From dd58304f5bf7ec7e3a53878cd3535a98f8ae1da7 Mon Sep 17 00:00:00 2001 From: pkuLmq <93322416+pkuLmq@users.noreply.github.com> Date: Sun, 8 Jun 2025 13:34:28 +0800 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 31c247e6..42f53954 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Detailed guide for installation and tutorials is available on [our documentation ## Features New in v1.6 (2025/5/30): -- Add a new solver, dfSteadyFoam, a steady-state compressible flow solver for HVAC and similar applications. It supports turbulence, optional mesh motion and topology changes, and uses the flexible PIMPLE algorithm to efficiently compute steady solutions +- Add a new solver, dfSteadyFoam, a steady-state compressible flow solver. It supports turbulence and uses the flexible PIMPLE algorithm to efficiently compute steady solutions - Extend energy model to support sensible enthalpy (hs) in addition to absolute enthalpy (ha) and internal energy (ea). Temperature can now be computed independently of Cantera via in-code Newton iteration, improving flexibility and removing external dependencies - Improve install.sh by displaying system architecture (e.g., x86_64) after build for clearer platform information - Switch to sphinx-book-theme and update documentation build environment (Ubuntu 24.04, Python 3.12) for better appearance and compatibility