diff --git a/.github/workflows/CPU_inferencce_validation.yml b/.github/workflows/CPU_inferencce_validation.yml index 7a0896b7..86326de6 100644 --- a/.github/workflows/CPU_inferencce_validation.yml +++ b/.github/workflows/CPU_inferencce_validation.yml @@ -62,7 +62,7 @@ jobs: cmake -B build cmake --build build cd build - ctest + ctest --output-on-failure diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ff80c105..c8d884f1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -23,6 +23,7 @@ file(COPY ./dfLowMachFoam/twoD_reactingTGV/H2/cvodeSolver/postProcessing/sample/ file(COPY ./dfLowMachFoam/twoD_SandiaD_flareFGM/postProcessing/sample/1.1/data_T.xy DESTINATION 2DSandia) file(COPY ./Tu500K-Phi1/fs DESTINATION flameSpeed) +file(COPY ./aachenBomb_2D/postProcessing/sample/0.0023/data_T.xy DESTINATION aachenBomb2D) enable_testing() diff --git a/test/aachenBomb_2D/0/N2 b/test/aachenBomb_2D/0/N2 new file mode 100644 index 00000000..f1263638 --- /dev/null +++ b/test/aachenBomb_2D/0/N2 @@ -0,0 +1,33 @@ +/*--------------------------------*- 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; + object N2; +} +// ************************************************************************* // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.766; + +boundaryField +{ + walls + { + type zeroGradient; + } + empty + { + type empty; + } +} + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/0/O2 b/test/aachenBomb_2D/0/O2 new file mode 100644 index 00000000..dcc0bcae --- /dev/null +++ b/test/aachenBomb_2D/0/O2 @@ -0,0 +1,33 @@ +/*--------------------------------*- 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; + object O2; +} +// ************************************************************************* // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.234; + +boundaryField +{ + walls + { + type zeroGradient; + } + empty + { + type empty; + } +} + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/0/T b/test/aachenBomb_2D/0/T new file mode 100644 index 00000000..36e55cfd --- /dev/null +++ b/test/aachenBomb_2D/0/T @@ -0,0 +1,33 @@ +/*--------------------------------*- 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; + object T; +} +// ************************************************************************* // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 800; + +boundaryField +{ + walls + { + type zeroGradient; + } + empty + { + type empty; + } +} + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/0/U b/test/aachenBomb_2D/0/U new file mode 100644 index 00000000..e57719f1 --- /dev/null +++ b/test/aachenBomb_2D/0/U @@ -0,0 +1,34 @@ +/*--------------------------------*- 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; + object U; +} +// ************************************************************************* // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + walls + { + type fixedValue; + value uniform (0 0 0); + } + empty + { + type empty; + } +} + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/0/Ydefault b/test/aachenBomb_2D/0/Ydefault new file mode 100644 index 00000000..0959451e --- /dev/null +++ b/test/aachenBomb_2D/0/Ydefault @@ -0,0 +1,33 @@ +/*--------------------------------*- 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; + object Ydefault; +} +// ************************************************************************* // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type zeroGradient; + } + empty + { + type empty; + } +} + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/0/alphat b/test/aachenBomb_2D/0/alphat new file mode 100644 index 00000000..9db7805b --- /dev/null +++ b/test/aachenBomb_2D/0/alphat @@ -0,0 +1,36 @@ +/*--------------------------------*- 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 volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type compressible::alphatWallFunction; + value uniform 0; + } + empty + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/0/epsilon b/test/aachenBomb_2D/0/epsilon new file mode 100644 index 00000000..c0d5a71f --- /dev/null +++ b/test/aachenBomb_2D/0/epsilon @@ -0,0 +1,36 @@ +/*--------------------------------*- 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 volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 90; + +boundaryField +{ + walls + { + type epsilonWallFunction; + value uniform 90; + } + empty + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/0/k b/test/aachenBomb_2D/0/k new file mode 100644 index 00000000..4c89e4d8 --- /dev/null +++ b/test/aachenBomb_2D/0/k @@ -0,0 +1,36 @@ +/*--------------------------------*- 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 volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + walls + { + type kqRWallFunction; + value uniform 1; + } + empty + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/0/nut b/test/aachenBomb_2D/0/nut new file mode 100644 index 00000000..a873ca78 --- /dev/null +++ b/test/aachenBomb_2D/0/nut @@ -0,0 +1,36 @@ +/*--------------------------------*- 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 volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type nutkWallFunction; + value uniform 0; + } + empty + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/0/p b/test/aachenBomb_2D/0/p new file mode 100644 index 00000000..29bb5c39 --- /dev/null +++ b/test/aachenBomb_2D/0/p @@ -0,0 +1,33 @@ +/*--------------------------------*- 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; + object p; +} +// ************************************************************************* // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 5e+06; + +boundaryField +{ + walls + { + type zeroGradient; + } + empty + { + type empty; + } +} + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/Allclean b/test/aachenBomb_2D/Allclean new file mode 100755 index 00000000..d7750630 --- /dev/null +++ b/test/aachenBomb_2D/Allclean @@ -0,0 +1,13 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +echo "Cleaning log.*" +rm log.* log* +echo "Cleaning processor*" +rm -r processor* +echo "Cleaning polyMesh/" +rm -r constant/polyMesh +echo "Cleaning time steps" +rm -r 0.00* +echo "Cleaning postProcessing" +rm -r postProcessing/ diff --git a/test/aachenBomb_2D/Allrun b/test/aachenBomb_2D/Allrun new file mode 100755 index 00000000..036b855e --- /dev/null +++ b/test/aachenBomb_2D/Allrun @@ -0,0 +1,14 @@ +#!/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 2 --allow-run-as-root $application -parallel + +runApplication reconstructPar +runApplication postProcess -func sample diff --git a/test/aachenBomb_2D/C7_oneStep.yaml b/test/aachenBomb_2D/C7_oneStep.yaml new file mode 100644 index 00000000..f96a21ce --- /dev/null +++ b/test/aachenBomb_2D/C7_oneStep.yaml @@ -0,0 +1,113 @@ +generator: ck2yaml +input-files: [chem.inp, therm.dat, trans.dat] +cantera-version: 2.5.1 +date: Sun, 29 May 2022 19:52:53 +0800 + +units: {length: cm, time: s, quantity: mol, activation-energy: cal/mol} + +phases: +- name: gas + thermo: ideal-gas + elements: [H, O, C, N, Ar] + species: [C7H16, O2, N2, CO2, H2O] + kinetics: gas + transport: mixture-averaged + state: {T: 300.0, P: 1 atm} + +species: +- name: C7H16 + composition: {C: 7, H: 16} + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 6000.0] + data: + - [11.1532994, -9.49419773e-03, 1.95572075e-04, -2.49753662e-07, 9.84877715e-11, + -2.67688904e+04, -15.9096837] + - [20.4565203, 0.0348575357, -1.09226846e-05, 1.67201776e-09, -9.8102485e-14, + -3.25556365e+04, -80.4405017] + note: P10/85 + transport: + model: gas + geometry: nonlinear + well-depth: 459.6 + diameter: 6.253 + rotational-relaxation: 1.0 + note: TCPC +- name: O2 + composition: {O: 2} + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 6000.0] + data: + - [3.78535371, -3.2192854e-03, 1.12323443e-05, -1.17254068e-08, 4.17659585e-12, + 1.02922572e+04, 3.27320239] + - [3.45852381, 1.04045351e-03, -2.79664041e-07, 3.11439672e-11, -8.55656058e-16, + 1.02229063e+04, 4.15264119] + note: ATcT06 + transport: + model: gas + geometry: linear + well-depth: 107.4 + diameter: 3.458 + polarizability: 1.6 + rotational-relaxation: 3.8 +- name: N2 + composition: {N: 2} + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 6000.0] + data: + - [3.53100528, -1.23660988e-04, -5.02999433e-07, 2.43530612e-09, -1.40881235e-12, + -1046.97628, 2.96747038] + - [2.95257637, 1.3969004e-03, -4.92631603e-07, 7.86010195e-11, -4.60755204e-15, + -923.948688, 5.87188762] + note: G8/02 + transport: + model: gas + geometry: linear + well-depth: 97.53 + diameter: 3.621 + polarizability: 1.76 + rotational-relaxation: 4.0 +- name: CO2 + composition: {C: 1, O: 2} + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 6000.0] + data: + - [2.356813, 8.9841299e-03, -7.1220632e-06, 2.4573008e-09, -1.4288548e-13, + -4.8371971e+04, 9.9009035] + - [4.6365111, 2.7414569e-03, -9.9589759e-07, 1.6038666e-10, -9.1619857e-15, + -4.9024904e+04, -1.9348955] + note: L7/88 + transport: + model: gas + geometry: linear + well-depth: 244.0 + diameter: 3.763 + polarizability: 2.65 + rotational-relaxation: 2.1 +- name: H2O + composition: {H: 2, O: 1} + thermo: + model: NASA7 + temperature-ranges: [200.0, 1000.0, 6000.0] + data: + - [4.1986352, -2.0364017e-03, 6.5203416e-06, -5.4879269e-09, 1.771968e-12, + -3.0293726e+04, -0.84900901] + - [2.6770389, 2.9731816e-03, -7.7376889e-07, 9.4433514e-11, -4.2689991e-15, + -2.9885894e+04, 6.88255] + note: L5/89 + transport: + model: gas + geometry: nonlinear + well-depth: 572.4 + diameter: 2.605 + dipole: 1.844 + rotational-relaxation: 4.0 + +reactions: +- equation: C7H16 + 11 O2 => 7 CO2 + 8 H2O # Reaction 1 + rate-constant: {A: 5.0e+08, b: 0.0, Ea: 1.578e+04} + orders: {C7H16: 0.25, O2: 1.5} + note: '1' diff --git a/test/aachenBomb_2D/constant/CanteraTorchProperties b/test/aachenBomb_2D/constant/CanteraTorchProperties new file mode 100644 index 00000000..9ffa283c --- /dev/null +++ b/test/aachenBomb_2D/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 "C7_oneStep.yaml"; + +transportModel "Mix"; + +odeCoeffs +{ + "relTol" 1e-6; + "absTol" 1e-10; +} + +inertSpecie "N2"; + +splittingStrategy off; + +TorchSettings +{ + torch off; + GPU off; + log off; + torchModel ""; + coresPerNode 4; +} + +loadbalancing +{ + active true; + log false; + algorithm allAverage;//headTail; +} + + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/constant/combustionProperties b/test/aachenBomb_2D/constant/combustionProperties new file mode 100644 index 00000000..7418500d --- /dev/null +++ b/test/aachenBomb_2D/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/test/aachenBomb_2D/constant/g b/test/aachenBomb_2D/constant/g new file mode 100644 index 00000000..28cfc236 --- /dev/null +++ b/test/aachenBomb_2D/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/test/aachenBomb_2D/constant/sprayCloudProperties b/test/aachenBomb_2D/constant/sprayCloudProperties new file mode 100644 index 00000000..67a4e7df --- /dev/null +++ b/test/aachenBomb_2D/constant/sprayCloudProperties @@ -0,0 +1,234 @@ +/*--------------------------------*- 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 true; + coupled true; + transient yes; + cellValueSourceCorrection on; + maxCo 0.3; + + sourceTerms + { + schemes + { + rho explicit 1; + U explicit 1; + Yi explicit 1; + h explicit 1; + radiation explicit 1; + } + } + + interpolationSchemes + { + rho cell; + U cellPoint; + thermo:mu cell; + T cell; + Cp cell; + kappa cell; + p cell; + } + + integrationSchemes + { + U Euler; + T analytical; + } +} + + +constantProperties +{ + T0 380;//320; + + // place holders for rho0 and Cp0 + // - reset from liquid properties using T0 + rho0 1000; + Cp0 4187; + + constantVolume false; +} + + +subModels +{ + particleForces + { + sphereDrag; + } + + injectionModels + { + model1 + { + type coneInjection; + SOI 0; + massTotal 8e-8; + parcelBasisType mass; + injectionMethod disc; + flowType flowRateAndDischarge; + dInner 0; + dOuter 1.2e-04;//1.9e-4; + duration 1.25e-3; + position (0 0.0995 0); + direction (0 -1 0); + parcelsPerSecond 20000000; + flowRateProfile table + ( + (0 0.1272) + (4.16667e-05 6.1634) + (8.33333e-05 9.4778) + (0.000125 9.5806) + (0.000166667 9.4184) + (0.000208333 9.0926) + (0.00025 8.7011) + (0.000291667 8.2239) + (0.000333333 8.0401) + (0.000375 8.8450) + (0.000416667 8.9174) + (0.000458333 8.8688) + (0.0005 8.8882) + (0.000541667 8.6923) + (0.000583333 8.0014) + (0.000625 7.2582) + (0.000666667 7.2757) + (0.000708333 6.9680) + (0.00075 6.7608) + (0.000791667 6.6502) + (0.000833333 6.7695) + (0.000875 5.5774) + (0.000916667 4.8649) + (0.000958333 5.0805) + (0.001 4.9547) + (0.00104167 4.5613) + (0.00108333 4.4536) + (0.001125 5.2651) + (0.00116667 5.2560) + (0.00120833 5.1737) + (0.00125 3.9213) + (0.001251 0.0000) + (1000 0.0000) + ); + + Cd constant 0.9; + + thetaInner constant 0.0; + thetaOuter constant 10.0; + + sizeDistribution + { + type RosinRammler; + + RosinRammlerDistribution + { + minValue 1e-06; + maxValue 0.00015; + d 0.00015; + n 3; + } + } + } + } + + dispersionModel none; + + patchInteractionModel standardWallInteraction; + + heatTransferModel RanzMarshall; + + compositionModel singlePhaseMixture; + + phaseChangeModel liquidEvaporationBoil; + + surfaceFilmModel none; + + atomizationModel none; + + breakupModel ReitzDiwakar; // ReitzKHRT; + + stochasticCollisionModel none; + + radiation off; + + standardWallInteractionCoeffs + { + type rebound; + } + + RanzMarshallCoeffs + { + BirdCorrection true; + } + + singlePhaseMixtureCoeffs + { + phases + ( + liquid + { + C7H16 1; + } + ); + } + + liquidEvaporationBoilCoeffs + { + enthalpyTransfer enthalpyDifference; + + activeLiquids ( C7H16 ); + } + + ReitzDiwakarCoeffs + { + solveOscillationEq yes; + Cbag 6; + Cb 0.785; + Cstrip 0.5; + Cs 10; + } + +/* + ReitzKHRTCoeffs + { + solveOscillationEq yes; + B0 0.61; + B1 40; + Ctau 1; + CRT 0.1; + msLimit 0.2; + WeberLimit 6; + } +*/ + TABCoeffs + { + y0 0; + yDot0 0; + Cmu 10; + Comega 8; + WeCrit 12; + } +} + + +cloudFunctions +{} + + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/constant/thermophysicalProperties b/test/aachenBomb_2D/constant/thermophysicalProperties new file mode 100644 index 00000000..06be802b --- /dev/null +++ b/test/aachenBomb_2D/constant/thermophysicalProperties @@ -0,0 +1,24 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +liquids +{ + C7H16; +} + +solids +{} +// ************************************************************************* // diff --git a/test/aachenBomb_2D/constant/turbulenceProperties b/test/aachenBomb_2D/constant/turbulenceProperties new file mode 100644 index 00000000..762189e6 --- /dev/null +++ b/test/aachenBomb_2D/constant/turbulenceProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- 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 turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/system/blockMeshDict b/test/aachenBomb_2D/system/blockMeshDict new file mode 100644 index 00000000..db7524c8 --- /dev/null +++ b/test/aachenBomb_2D/system/blockMeshDict @@ -0,0 +1,68 @@ +/*--------------------------------*- 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 +( + (-10 0 -1e-3) + (-10 0 1e-3) + (10 0 1e-3) + (10 0 -1e-3) + (-10 100 -1e-3) + (-10 100 1e-3) + (10 100 1e-3) + (10 100 -1e-3) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (1 41 100) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + walls + { + type wall; + faces + ( + (4 5 6 7) + (3 2 1 0) + (7 6 2 3) + (0 1 5 4) + ); + } + empty + { + type empty; + faces + ( + (2 6 5 1) + (0 4 7 3) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/system/controlDict b/test/aachenBomb_2D/system/controlDict new file mode 100644 index 00000000..0335b5ed --- /dev/null +++ b/test/aachenBomb_2D/system/controlDict @@ -0,0 +1,56 @@ +/*--------------------------------*- 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 ( + "libEvaporationNew.so" + ); + +application dfLowMachFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 2.3e-3; + +deltaT 2.5e-06; + +writeControl adjustableRunTime; + +writeInterval 1e-04; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression on; + +timeFormat general; + +timePrecision 6; + +adjustTimeStep no; + +maxCo 0.1; + +runTimeModifiable yes; + + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/system/decomposeParDict b/test/aachenBomb_2D/system/decomposeParDict new file mode 100644 index 00000000..696bca8a --- /dev/null +++ b/test/aachenBomb_2D/system/decomposeParDict @@ -0,0 +1,28 @@ +/*--------------------------------*- 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 decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method simple; + +simpleCoeffs +{ + n (1 2 1); + delta 0; +} + + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/system/fvSchemes b/test/aachenBomb_2D/system/fvSchemes new file mode 100644 index 00000000..dd991a49 --- /dev/null +++ b/test/aachenBomb_2D/system/fvSchemes @@ -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 fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss upwind; + div(phid,p) Gauss upwind; + div(phi,K) Gauss linear; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(U) Gauss linear; + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; + div(phi,Yi_h) Gauss upwind; + div(hDiffCorrFlux) Gauss cubic; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/system/fvSolution b/test/aachenBomb_2D/system/fvSolution new file mode 100644 index 00000000..5790575b --- /dev/null +++ b/test/aachenBomb_2D/system/fvSolution @@ -0,0 +1,100 @@ +/*--------------------------------*- 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 PCG; + preconditioner DIC; + tolerance 1e-05; + relTol 0.1; + } + + + rhoFinal + { + $rho; + tolerance 1e-05; + relTol 0; + } + + "(U|k|epsilon)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-06; + relTol 0.1; + } + + p + { + solver GAMG; + tolerance 0; + relTol 0.1; + smoother GaussSeidel; + } + + pFinal + { + $p; + tolerance 1e-06; + relTol 0; + } + + "(U|k|epsilon)Final" + { + $U; + tolerance 1e-06; + relTol 0; + } + + "(ha|Yi|O2|N2|H2O)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-6; + relTol 0.1; + } + + "(ha|Yi|O2|N2|H2O)Final" + { + $Yi; + relTol 0; + } + + + +} + +PIMPLE +{ + transonic no; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + momentumPredictor yes; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + +// ************************************************************************* // diff --git a/test/aachenBomb_2D/system/sample b/test/aachenBomb_2D/system/sample new file mode 100644 index 00000000..2b19cfa1 --- /dev/null +++ b/test/aachenBomb_2D/system/sample @@ -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 +{ + format ascii; + class dictionary; + location "system"; + object sample; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type sets; +libs ("libsampling.so"); + +interpolationScheme cellPoint; + +setFormat raw; + +sets +( + data + { + type lineUniform; + axis y; + start (0 0 0); + end (0 0.1 0); + nPoints 100; + } +); + +fields (T); + +// ************************************************************************* // \ No newline at end of file diff --git a/test/corrtest.cpp b/test/corrtest.cpp index 2ae8a26a..a8263e67 100644 --- a/test/corrtest.cpp +++ b/test/corrtest.cpp @@ -37,6 +37,12 @@ float T9 = readSandia(9,"2DSandia/data_T.xy"); float T10 = readSandia(10,"2DSandia/data_T.xy"); float T11 = readSandia(11,"2DSandia/data_T.xy"); +float readBomb(int k, string file); +float aachenBomb1 = readBomb(158,"aachenBomb2D/data_T.xy"); +float aachenBomb2 = readBomb(168,"aachenBomb2D/data_T.xy"); +float aachenBomb3 = readBomb(174,"aachenBomb2D/data_T.xy"); +float aachenBomb4 = readBomb(192,"aachenBomb2D/data_T.xy"); + TEST(corrtest,dfHighSpeedFoam){ EXPECT_NEAR(v,1979.33,19.79); // within 1% of the theroetical value @@ -64,6 +70,13 @@ TEST(corrtest,2DSandia){ EXPECT_FLOAT_EQ(T11,1081.8983); } +TEST(corrtest,dfLowMachFoam_2DaachenBomb){ + EXPECT_NEAR(aachenBomb1,809.163,0.0001); + EXPECT_NEAR(aachenBomb2,1793.4,0.0001); + EXPECT_NEAR(aachenBomb3,908.059,0.0001); + EXPECT_NEAR(aachenBomb4,2493.09,0.0001); +} + float readmaxTH2(){ float a; string inFileName = "0DH2/T" ; @@ -220,6 +233,35 @@ float readSandia(int k, string file){ return b; } +float readBomb(int k, string file){ + + float a; + float b; + int i = 0; + + string inFileName = file; + ifstream inFile; + inFile.open(inFileName.c_str()); + + if (inFile.is_open()) + { + while (inFile >> a){ + i ++ ; + if (i == k){ + b = a; + } + } + + } + else { //Error message + cerr << "Can't find input file " << inFileName << endl; + } + + cout << b << endl; + + return b; +} + float readflameSpeed(int k, string file); float fs = readflameSpeed(3,"flameSpeed/fs");