diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H.gz deleted file mode 100644 index e0265689..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H2.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H2.gz deleted file mode 100644 index 4674ce6d..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H2.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H2O.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H2O.gz deleted file mode 100644 index 8fbd42b7..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H2O.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H2O2.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H2O2.gz deleted file mode 100644 index ce14de9b..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/H2O2.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/HO2.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/HO2.gz deleted file mode 100644 index 50c50e79..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/HO2.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/N2.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/N2.gz deleted file mode 100644 index fae63f29..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/N2.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/O.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/O.gz deleted file mode 100644 index 1d0aebb3..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/O.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/O2.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/O2.gz deleted file mode 100644 index 87f403b1..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/O2.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/OH.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/OH.gz deleted file mode 100644 index 35a199a1..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/OH.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/T.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/T.gz deleted file mode 100644 index ef777773..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/T.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/U.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/U.gz deleted file mode 100644 index 1ceb95c7..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/U.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/p.gz b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/p.gz deleted file mode 100644 index 6bc27aba..00000000 Binary files a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/0/p.gz and /dev/null differ diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/Allclean b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/Allclean deleted file mode 100755 index 2cd9e224..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/Allclean +++ /dev/null @@ -1,9 +0,0 @@ -#!/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/threeD_reactingTGV/CH4/pytorchIntegrator/Allrun b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/Allrun deleted file mode 100755 index 235aa392..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/Allrun +++ /dev/null @@ -1,11 +0,0 @@ -#!/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 $application -parallel diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/CanteraTorchProperties b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/CanteraTorchProperties deleted file mode 100644 index 6dfb79a4..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/CanteraTorchProperties +++ /dev/null @@ -1,50 +0,0 @@ -/*--------------------------------*- 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 on; - GPU on; - log on; - torchModel ""; - coresPerNode 4; -} - -loadbalancing -{ - active true; - log false; -} - - -// ************************************************************************* // diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/combustionProperties b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/combustionProperties deleted file mode 100644 index 7418500d..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/combustionProperties +++ /dev/null @@ -1,20 +0,0 @@ -/*--------------------------------*- 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/threeD_reactingTGV/CH4/pytorchIntegrator/constant/thermophysicalProperties b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/thermophysicalProperties deleted file mode 100644 index 7f207bb7..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/thermophysicalProperties +++ /dev/null @@ -1,18 +0,0 @@ -/*--------------------------------*- 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; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// ************************************************************************* // diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/turbulenceProperties b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/turbulenceProperties deleted file mode 100644 index ab70e94d..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/constant/turbulenceProperties +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------*- 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/threeD_reactingTGV/CH4/pytorchIntegrator/drm19.yaml b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/drm19.yaml deleted file mode 120000 index 6aed11e7..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/drm19.yaml +++ /dev/null @@ -1 +0,0 @@ -../../../../../mechanisms/CH4/drm19.yaml \ No newline at end of file diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/inference.py b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/inference.py deleted file mode 100644 index bf0bd7b7..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/inference.py +++ /dev/null @@ -1,173 +0,0 @@ -from builtins import Exception, print -from calendar import prcal -import torch -import numpy as np -import math -import time -import json -import os -from easydict import EasyDict as edict -import torch.profiler -import os - -torch.set_printoptions(precision=10) -print('position 0 in inference.py') -device = torch.device("cuda") -device_ids = range(torch.cuda.device_count()) - - - -class MyGELU(torch.nn.Module): - def __init__(self): - super(MyGELU, self).__init__() - self.torch_PI = 3.1415926536 - - def forward(self, x): - return 0.5 * x * (1 + torch.tanh( - math.sqrt(2 / self.torch_PI) * (x + 0.044715 * torch.pow(x, 3)))) - - -def json2Parser(json_path): - """load json and return parser-like object""" - with open(json_path, 'r') as f: - args = json.load(f) - return edict(args) - - -class Net(torch.nn.Module): - def __init__(self): - super(Net, self).__init__() - neurons = layers - self.depth = len(neurons) - 1 - self.actfun = MyGELU() - self.layers = [] - for i in range(self.depth - 1): - self.layers.append(torch.nn.Linear(neurons[i], neurons[i + 1])) - self.layers.append(self.actfun) - self.layers.append(torch.nn.Linear(neurons[-2], neurons[-1])) # last layer - self.fc = torch.nn.Sequential(*self.layers) - - def forward(self, x): - x = self.fc(x) - return x -try: - #glbal variable will only init once when called interperter - #load parameters from json - setting0 = json2Parser('settingsdrm19_0.json') - setting1 = json2Parser('settingsdrm19_1.json') - setting2 = json2Parser('settingsdrm19_2.json') - - lamda = setting0.power_transform - delta_t = setting0.delta_t - dim = setting0.dim - layers = setting0.layers - - Xmu0 = torch.tensor(setting0.Xmu).unsqueeze(0).to(device) - Xstd0 = torch.tensor(setting0.Xstd).unsqueeze(0).to(device=device) - Ymu0 = torch.tensor(setting0.Ymu).unsqueeze(0).to(device=device) - Ystd0 = torch.tensor(setting0.Ystd).unsqueeze(0).to(device=device) - - Xmu1 = torch.tensor(setting1.Xmu).unsqueeze(0).to(device=device) - Xstd1 = torch.tensor(setting1.Xstd).unsqueeze(0).to(device=device) - Ymu1 = torch.tensor(setting1.Ymu).unsqueeze(0).to(device=device) - Ystd1 = torch.tensor(setting1.Ystd).unsqueeze(0).to(device=device) - - Xmu2 = torch.tensor(setting2.Xmu).unsqueeze(0).to(device=device) - Xstd2 = torch.tensor(setting2.Xstd).unsqueeze(0).to(device=device) - Ymu2 = torch.tensor(setting2.Ymu).unsqueeze(0).to(device=device) - Ystd2 = torch.tensor(setting2.Ystd).unsqueeze(0).to(device=device) - print('position 1 in inference.py') - - #load module - model0 = Net() - model1 = Net() - model2 = Net() - check_point0 = torch.load('modeldrm19_0.pt') - check_point1 = torch.load('modeldrm19_1.pt') - check_point2 = torch.load('modeldrm19_2.pt') - model0.load_state_dict(check_point0) - model1.load_state_dict(check_point1) - model2.load_state_dict(check_point2) - model0.to(device=device) - model1.to(device=device) - model2.to(device=device) - if len(device_ids) > 1: - model0 = torch.nn.DataParallel(model0, device_ids=device_ids) - model1 = torch.nn.DataParallel(model1, device_ids=device_ids) - model2 = torch.nn.DataParallel(model2, device_ids=device_ids) - print('call init') -except Exception as e: - print(e.args) - - -def inference(vec0, vec1, vec2): - ''' - use model to inference - ''' - #args = np.reshape(args, (-1, 9)) #reshape to formed size - vec0 = np.reshape(vec0, (-1, 24)) - vec1 = np.reshape(vec1, (-1, 24)) - vec2 = np.reshape(vec2, (-1, 24)) - - try: - with torch.no_grad(): - input0_ = torch.from_numpy(vec0).double().to(device=device) #cast ndarray to torch tensor - input1_ = torch.from_numpy(vec1).double().to(device=device) #cast ndarray to torch tensor - input2_ = torch.from_numpy(vec2).double().to(device=device) #cast ndarray to torch tensor - - # pre_processing - rho0 = input0_[:, 0].unsqueeze(1) - input0_Y = input0_[:, 3:].clone() - input0_bct = input0_[:, 1:] - input0_bct[:, 2:] = (input0_bct[:, 2:]**(lamda) - 1) / lamda #BCT - input0_normalized = (input0_bct - Xmu0) / Xstd0 - input0_normalized[:, -1] = 0 #set Y_AR to 0 - input0_normalized = input0_normalized.float() - - rho1 = input1_[:, 0].unsqueeze(1) - input1_Y = input1_[:, 3:].clone() - input1_bct = input1_[:, 1:] - input1_bct[:, 2:] = (input1_bct[:, 2:]**(lamda) - 1) / lamda #BCT - input1_normalized = (input1_bct - Xmu1) / Xstd1 - input1_normalized[:, -1] = 0 #set Y_AR to 0 - input1_normalized = input1_normalized.float() - - - rho2 = input2_[:, 0].unsqueeze(1) - input2_Y = input2_[:, 3:].clone() - input2_bct = input2_[:, 1:] - input2_bct[:, 2:] = (input2_bct[:, 2:]**(lamda) - 1) / lamda #BCT - input2_normalized = (input2_bct - Xmu2) / Xstd2 - input2_normalized[:, -1] = 0 #set Y_AR to 0 - input2_normalized = input2_normalized.float() - - #inference - output0_normalized = model0(input0_normalized) - output1_normalized = model1(input1_normalized) - output2_normalized = model2(input2_normalized) - - - # post_processing - output0_bct = (output0_normalized * Ystd0 + Ymu0) * delta_t + input0_bct - output0_Y = (lamda * output0_bct[:, 2:] + 1)**(1 / lamda) - output0_Y = output0_Y / torch.sum(input=output0_Y, dim=1, keepdim=True) - output0 = (output0_Y - input0_Y) * rho0 / delta_t - output0 = output0.cpu().numpy() - - output1_bct = (output1_normalized * Ystd1 + Ymu1) * delta_t + input1_bct - output1_Y = (lamda * output1_bct[:, 2:] + 1)**(1 / lamda) - output1_Y = output1_Y / torch.sum(input=output1_Y, dim=1, keepdim=True) - output1 = (output1_Y - input1_Y) * rho1 / delta_t - output1 = output1.cpu().numpy() - - output2_bct = (output2_normalized * Ystd2 + Ymu2) * delta_t + input2_bct - output2_Y = (lamda * output2_bct[:, 2:] + 1)**(1 / lamda) - output2_Y = output2_Y / torch.sum(input=output2_Y, dim=1, keepdim=True) - output2 = (output2_Y - input2_Y) * rho2 / delta_t - output2 = output2.cpu().numpy() - - result = np.append(output0, output1, axis=0) - result = np.append(result, output2, axis=0) - return result - except Exception as e: - print(e.args) diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/blockMeshDict b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/blockMeshDict deleted file mode 100644 index e8e079bc..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/blockMeshDict +++ /dev/null @@ -1,103 +0,0 @@ -/*--------------------------------*- 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 -( - (0 0 0) - (6.283185307179586 0 0) - (6.283185307179586 6.283185307179586 0) - (0 6.283185307179586 0) - (0 0 6.283185307179586) - (6.283185307179586 0 6.283185307179586) - (6.283185307179586 6.283185307179586 6.283185307179586) - (0 6.283185307179586 6.283185307179586) -); - - -blocks -( - hex (0 1 2 3 4 5 6 7) (64 64 64) simpleGrading (1 1 1) -); - -edges -( -); - -boundary -( - front - { - type cyclic; - neighbourPatch back; - faces - ( - (4 5 6 7) - ); - } - back - { - type cyclic; - neighbourPatch front; - faces - ( - (0 3 2 1) - ); - } - left - { - type cyclic; - neighbourPatch right; - faces - ( - (0 4 7 3) - ); - } - right - { - type cyclic; - neighbourPatch left; - faces - ( - (2 6 5 1) - ); - } - top - { - type cyclic; - neighbourPatch down; - faces - ( - (3 7 6 2) - ); - } - down - { - type cyclic; - neighbourPatch top; - faces - ( - (1 5 4 0) - ); - } -); - -// mergePatchPairs -// ( -// ); - -// ************************************************************************* // diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/controlDict b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/controlDict deleted file mode 100644 index 99fe800c..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/controlDict +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------*- 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 startTime; - -startTime 0; - -stopAt endTime; - -endTime 1e-5; - -deltaT 1e-6; - -maxDeltaT 1e-04; - -adjustTimeStep off; - -writeControl adjustableRunTime; - -writeInterval 5e-6; - -purgeWrite 0; - -writeFormat ascii; - -// writePrecision 6; - -writeCompression on; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable true; - -// adjustTimeStep yes; - -// maxCo 0.8; - -// maxDeltaT 1e-4; - - -// ************************************************************************* // diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/decomposeParDict b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/decomposeParDict deleted file mode 100644 index 45c7f859..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/decomposeParDict +++ /dev/null @@ -1,45 +0,0 @@ -/*--------------------------------*- 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 4; - -method scotch; - -simpleCoeffs -{ - n (4 1 1); - delta 0.001; -} - -hierarchicalCoeffs -{ - n (1 1 1); - delta 0.001; - order xyz; -} - -manualCoeffs -{ - dataFile ""; -} - -distributed no; - -roots ( ); - - -// ************************************************************************* // diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/funkySetFieldsDict b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/funkySetFieldsDict deleted file mode 100644 index 4cb58b7f..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/funkySetFieldsDict +++ /dev/null @@ -1,29 +0,0 @@ -/*--------------------------------*- 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 funkySetFieldsDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -expressions - ( -TGV_U - { - field U; - expression "vector(4*sin(pos().x/0.001)*cos(pos().y/0.001)*cos(pos().z/0.001),-4*cos(pos().x/0.001)*sin(pos().y/0.001)*cos(pos().z/0.001),0)"; - keepPatches 1; - } - ); - - -// ************************************************************************* // diff --git a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/fvSchemes b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/fvSchemes deleted file mode 100644 index c5c9136e..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/fvSchemes +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------*- 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/threeD_reactingTGV/CH4/pytorchIntegrator/system/fvSolution b/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/fvSolution deleted file mode 100644 index 73baadbf..00000000 --- a/examples/dfLowMachFoam/threeD_reactingTGV/CH4/pytorchIntegrator/system/fvSolution +++ /dev/null @@ -1,89 +0,0 @@ -/*--------------------------------*- 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-9; - relTol 0; - 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-9; - relTol 0; - } - - "Yi" - { - solver PBiCGStab; - preconditioner DILU; - tolerance 1e-7; - relTol 0.01; - } - "YiFinal" - { - solver PBiCGStab; - preconditioner DILU; - tolerance 1e-9; - relTol 0; - } -} - -PIMPLE -{ - momentumPredictor yes; - nOuterCorrectors 1; - nCorrectors 2; - nNonOrthogonalCorrectors 0; -} - - -// ************************************************************************* // diff --git a/examples/dfLowMachFoam/twoD_HIT_flame/CH4/pytorchIntegrator/Allclean b/examples/dfLowMachFoam/twoD_HIT_flame/CH4/pytorchIntegrator/Allclean old mode 100644 new mode 100755 diff --git a/examples/dfLowMachFoam/twoD_HIT_flame/CH4/pytorchIntegrator/Allrun b/examples/dfLowMachFoam/twoD_HIT_flame/CH4/pytorchIntegrator/Allrun old mode 100644 new mode 100755 diff --git a/examples/dfLowMachFoam/twoD_reactingTGV/CH4/pytorchIntegrator/Allclean b/examples/dfLowMachFoam/twoD_reactingTGV/CH4/pytorchIntegrator/Allclean old mode 100644 new mode 100755 diff --git a/examples/dfLowMachFoam/twoD_reactingTGV/CH4/pytorchIntegrator/Allrun b/examples/dfLowMachFoam/twoD_reactingTGV/CH4/pytorchIntegrator/Allrun old mode 100644 new mode 100755 diff --git a/examples/dfSprayFoam/sydneySprayBurner/Allclean b/examples/dfSprayFoam/sydneySprayBurner/Allclean old mode 100644 new mode 100755 diff --git a/examples/dfSprayFoam/sydneySprayBurner/Allrun b/examples/dfSprayFoam/sydneySprayBurner/Allrun old mode 100644 new mode 100755 index ab4c0d6c..87dd7697 --- a/examples/dfSprayFoam/sydneySprayBurner/Allrun +++ b/examples/dfSprayFoam/sydneySprayBurner/Allrun @@ -8,4 +8,4 @@ application=dfSprayFoam runApplication blockMesh runApplication decomposePar -runApplication mpirun -np 8 $application -parallel +runApplication mpirun -np 4 $application -parallel