From c7f84725a50820bacc3f0441895e40fb979318cb Mon Sep 17 00:00:00 2001 From: JX278 Date: Mon, 21 Nov 2022 10:48:23 +0800 Subject: [PATCH 1/3] correct libtorch cases --- .../constant/CanteraTorchProperties | 3 ++- .../constant/CanteraTorchProperties | 12 +++++++++--- .../constant/CanteraTorchProperties | 12 +++++++++--- .../constant/CanteraTorchProperties | 12 +++++++++--- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/constant/CanteraTorchProperties b/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/constant/CanteraTorchProperties index ec7d68c3..6fecdc45 100644 --- a/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/constant/CanteraTorchProperties +++ b/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/constant/CanteraTorchProperties @@ -44,7 +44,8 @@ TorchSettings torchModel1 "new_ESH2sub1.pt"; torchModel2 "new_ESH2sub2.pt"; torchModel3 "new_ESH2sub3.pt"; - coresPerNode 4; + coresPerGPU 4; + GPUsPerNode 4; } loadbalancing diff --git a/examples/dfLowMachFoam/oneD_freelyPropagation/H2/libtorchIntegrator/constant/CanteraTorchProperties b/examples/dfLowMachFoam/oneD_freelyPropagation/H2/libtorchIntegrator/constant/CanteraTorchProperties index d6027303..6fecdc45 100644 --- a/examples/dfLowMachFoam/oneD_freelyPropagation/H2/libtorchIntegrator/constant/CanteraTorchProperties +++ b/examples/dfLowMachFoam/oneD_freelyPropagation/H2/libtorchIntegrator/constant/CanteraTorchProperties @@ -23,12 +23,17 @@ transportModel "Mix"; odeCoeffs { - "relTol" 1e-6; - "absTol" 1e-10; + "relTol" 1e-15; + "absTol" 1e-24; } inertSpecie "N2"; +zeroDReactor +{ + constantProperty "pressure"; +} + splittingStrategy off; TorchSettings @@ -39,7 +44,8 @@ TorchSettings torchModel1 "new_ESH2sub1.pt"; torchModel2 "new_ESH2sub2.pt"; torchModel3 "new_ESH2sub3.pt"; - coresPerNode 4; + coresPerGPU 4; + GPUsPerNode 4; } loadbalancing diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/H2/libtorchIntegrator/constant/CanteraTorchProperties b/examples/dfLowMachFoam/threeD_reactingTGV/H2/libtorchIntegrator/constant/CanteraTorchProperties index d6027303..6fecdc45 100644 --- a/examples/dfLowMachFoam/threeD_reactingTGV/H2/libtorchIntegrator/constant/CanteraTorchProperties +++ b/examples/dfLowMachFoam/threeD_reactingTGV/H2/libtorchIntegrator/constant/CanteraTorchProperties @@ -23,12 +23,17 @@ transportModel "Mix"; odeCoeffs { - "relTol" 1e-6; - "absTol" 1e-10; + "relTol" 1e-15; + "absTol" 1e-24; } inertSpecie "N2"; +zeroDReactor +{ + constantProperty "pressure"; +} + splittingStrategy off; TorchSettings @@ -39,7 +44,8 @@ TorchSettings torchModel1 "new_ESH2sub1.pt"; torchModel2 "new_ESH2sub2.pt"; torchModel3 "new_ESH2sub3.pt"; - coresPerNode 4; + coresPerGPU 4; + GPUsPerNode 4; } loadbalancing diff --git a/examples/dfLowMachFoam/twoD_tripleFlame/H2/libtorchIntegrator/constant/CanteraTorchProperties b/examples/dfLowMachFoam/twoD_tripleFlame/H2/libtorchIntegrator/constant/CanteraTorchProperties index d6027303..6fecdc45 100644 --- a/examples/dfLowMachFoam/twoD_tripleFlame/H2/libtorchIntegrator/constant/CanteraTorchProperties +++ b/examples/dfLowMachFoam/twoD_tripleFlame/H2/libtorchIntegrator/constant/CanteraTorchProperties @@ -23,12 +23,17 @@ transportModel "Mix"; odeCoeffs { - "relTol" 1e-6; - "absTol" 1e-10; + "relTol" 1e-15; + "absTol" 1e-24; } inertSpecie "N2"; +zeroDReactor +{ + constantProperty "pressure"; +} + splittingStrategy off; TorchSettings @@ -39,7 +44,8 @@ TorchSettings torchModel1 "new_ESH2sub1.pt"; torchModel2 "new_ESH2sub2.pt"; torchModel3 "new_ESH2sub3.pt"; - coresPerNode 4; + coresPerGPU 4; + GPUsPerNode 4; } loadbalancing From 8b1046df47db06674213ea191c321d72604637e7 Mon Sep 17 00:00:00 2001 From: JX278 Date: Mon, 21 Nov 2022 10:56:38 +0800 Subject: [PATCH 2/3] odecoeff --- .../H2/libtorchIntegrator/constant/CanteraTorchProperties | 4 ++-- .../H2/libtorchIntegrator/constant/CanteraTorchProperties | 4 ++-- .../H2/libtorchIntegrator/constant/CanteraTorchProperties | 4 ++-- .../H2/libtorchIntegrator/constant/CanteraTorchProperties | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/constant/CanteraTorchProperties b/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/constant/CanteraTorchProperties index 6fecdc45..0fe1354c 100644 --- a/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/constant/CanteraTorchProperties +++ b/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/constant/CanteraTorchProperties @@ -23,8 +23,8 @@ transportModel "Mix"; odeCoeffs { - "relTol" 1e-15; - "absTol" 1e-24; + "relTol" 1e-6; + "absTol" 1e-10; } inertSpecie "N2"; diff --git a/examples/dfLowMachFoam/oneD_freelyPropagation/H2/libtorchIntegrator/constant/CanteraTorchProperties b/examples/dfLowMachFoam/oneD_freelyPropagation/H2/libtorchIntegrator/constant/CanteraTorchProperties index 6fecdc45..0fe1354c 100644 --- a/examples/dfLowMachFoam/oneD_freelyPropagation/H2/libtorchIntegrator/constant/CanteraTorchProperties +++ b/examples/dfLowMachFoam/oneD_freelyPropagation/H2/libtorchIntegrator/constant/CanteraTorchProperties @@ -23,8 +23,8 @@ transportModel "Mix"; odeCoeffs { - "relTol" 1e-15; - "absTol" 1e-24; + "relTol" 1e-6; + "absTol" 1e-10; } inertSpecie "N2"; diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/H2/libtorchIntegrator/constant/CanteraTorchProperties b/examples/dfLowMachFoam/threeD_reactingTGV/H2/libtorchIntegrator/constant/CanteraTorchProperties index 6fecdc45..0fe1354c 100644 --- a/examples/dfLowMachFoam/threeD_reactingTGV/H2/libtorchIntegrator/constant/CanteraTorchProperties +++ b/examples/dfLowMachFoam/threeD_reactingTGV/H2/libtorchIntegrator/constant/CanteraTorchProperties @@ -23,8 +23,8 @@ transportModel "Mix"; odeCoeffs { - "relTol" 1e-15; - "absTol" 1e-24; + "relTol" 1e-6; + "absTol" 1e-10; } inertSpecie "N2"; diff --git a/examples/dfLowMachFoam/twoD_tripleFlame/H2/libtorchIntegrator/constant/CanteraTorchProperties b/examples/dfLowMachFoam/twoD_tripleFlame/H2/libtorchIntegrator/constant/CanteraTorchProperties index 6fecdc45..0fe1354c 100644 --- a/examples/dfLowMachFoam/twoD_tripleFlame/H2/libtorchIntegrator/constant/CanteraTorchProperties +++ b/examples/dfLowMachFoam/twoD_tripleFlame/H2/libtorchIntegrator/constant/CanteraTorchProperties @@ -23,8 +23,8 @@ transportModel "Mix"; odeCoeffs { - "relTol" 1e-15; - "absTol" 1e-24; + "relTol" 1e-6; + "absTol" 1e-10; } inertSpecie "N2"; From 53b578177b85342c84789819782a573b87757a24 Mon Sep 17 00:00:00 2001 From: JX278 Date: Mon, 21 Nov 2022 11:03:07 +0800 Subject: [PATCH 3/3] update 0D --- .../H2/libtorchIntegrator/system/blockMeshDict | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/system/blockMeshDict b/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/system/blockMeshDict index 35edbf14..b762a930 100644 --- a/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/system/blockMeshDict +++ b/examples/df0DFoam/zeroD_cubicReactor/H2/libtorchIntegrator/system/blockMeshDict @@ -31,7 +31,7 @@ vertices blocks ( - hex (0 1 2 3 4 5 6 7) (1 1 1) simpleGrading (1 1 1) + hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1) ); edges