Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5ef2a46
initial changes to allow eosparm
baperry2 Jun 20, 2022
f04b9dd
more updates to use eosparm for (almost) all eos calls
baperry2 Jun 20, 2022
fcb7c2c
dont hardcode reference to species ID, instead normalize by rescaling
baperry2 Jun 20, 2022
83fd3be
Manifold EOS and Transport defines in makefile
baperry2 Jun 20, 2022
3419b44
Add templated divu and transport functions for Manifold EOS
baperry2 Jun 20, 2022
9c0bf3e
eosparm for initdata and bcnormal
baperry2 Jun 20, 2022
20ab368
include manfunc parms in init
baperry2 Jun 21, 2022
5b2ab08
don't compute Z or C with manifold yet
baperry2 Jun 21, 2022
454147a
updates for Advection for Manifold
baperry2 Jun 21, 2022
f6fd86f
Some error checking for Manifold EOS
baperry2 Jun 21, 2022
2835c9d
more error checking
baperry2 Jun 21, 2022
8f79f16
Don't enforce diffusion fluxes sum to 0 for Manifold
baperry2 Jun 21, 2022
5e9f3bb
Kernel changes for getting Rho from RhoY
baperry2 Jun 21, 2022
71864c9
add different chi correction methods
baperry2 Jun 22, 2022
e230d13
density correction for manifold redundant density
baperry2 Jun 22, 2022
152ca12
PMF test case for manifold model
baperry2 Jun 22, 2022
3bcda07
Cleaning things up
baperry2 Jun 23, 2022
02e9a87
Ostensibly working PeleLMeX setup with neural net
KiranEiden Jun 30, 2022
a983713
Allow for neural network models without LibTorch
KiranEiden Jul 12, 2022
09ac2a5
change in deriv lookup for log rho
baperry2 Jul 12, 2022
fe0c8f7
fix bcnormal so inlet density is consistent with EOS
baperry2 Jul 12, 2022
a317530
fix compile bug
baperry2 Jul 12, 2022
1064861
Add derived quantities from manifold model
baperry2 Jul 6, 2022
37d6b49
Merge pull request #1 from baperry2/logrho
KiranEiden Jul 13, 2022
8ed0bce
Make pelelm_dermaniout GPU-compatible (hopefully)
KiranEiden Jul 25, 2022
c61e828
Use 'get_all_values' function so we don't need index array
KiranEiden Jul 26, 2022
951560c
update enclosed flame case for manifold models
baperry2 Aug 2, 2022
5160978
updated case files for 2D kernel case
baperry2 Aug 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions Exec/RegTests/EnclosedFlame/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
TOP = ../../../..
TOP = ../../../Submodules
AMREX_HOME ?= ${TOP}/amrex
PELELMEX_HOME ?= ${TOP}/PeleLMeX
PELELMEX_HOME ?= ${TOP}/..
PELE_PHYSICS_HOME ?= ${TOP}/PelePhysics
AMREX_HYDRO_HOME ?= ${TOP}/AMReX-Hydro


# AMReX
DIM = 2
DEBUG = FALSE
PRECISION = DOUBLE
VERBOSE = FALSE
TINY_PROFILE = FALSE
TINY_PROFILE = TRUE

# Compilation
COMP = gnu
Expand All @@ -21,9 +20,19 @@ USE_HIP = FALSE

# PeleLMeX

FUEGO_GAS = FALSE
# PelePhysics
Chemistry_Model = drm19
Eos_Model = Fuego
Transport_Model = Simple
ifeq ($(FUEGO_GAS), TRUE)
Chemistry_Model = posf10325
Eos_Model = Fuego
Transport_Model = Simple
else
USE_LIBTORCH = FALSE
LIBTORCH_HOME = /home/bperry/libtorch
DEFINES += -D_GLIBCXX_USE_CXX11_ABI=0
Eos_Model = Manifold
Chemistry_Model = Manifold2d
Transport_Model = Manifold
endif

include $(PELELMEX_HOME)/Utils/Make.PeleLMeX
39 changes: 39 additions & 0 deletions Exec/RegTests/EnclosedFlame/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Stuff that needs to be done to run this case

-- COMPILE --
make TPL -j
make -j

-- Generate Turbulence initial condition --
python gen_hit_ic.py -k0 4 -N 128

-- Run --
srun -n 36 PeleLMeX2d.gnu.TPROF.MPI.ex input.nn


#### NOTES ####
Contained are files to run with an FGM+ANN model trained on a 1D premixed flame
and a CMLM model trained from corresponding 3D DNS

Required files include a pmf data file used to set the initial condition.
In the input.nn file, set either

pmf.datafile = "prem_posf10325_phi1_p1_t298_mani_cmlm.dat"
-- OR --
pmf.datafile = "prem_posf10325_phi1_p1_t298_mani_fgm.dat"

Also required are a neural network file and info file.
In the input.nn file, set either

manifold.filename = cmlm_net.pnn
manifold.info_filename = cmlm_net_info.txt
-- OR --
manifold.filename = fgm_net.pnn
manifold.info_filename = fgm_net_info.txt

Note that the CMLM model is a 2D manifold while the FGM one is a 1D manifold.
This means the correct setting must be used in the GNUmakefile when compiling:

Chemistry_Model = Manifold2d
-- OR --
Chemistry_Model = Manifold
Binary file added Exec/RegTests/EnclosedFlame/cmlm_net.pnn
Binary file not shown.
Binary file added Exec/RegTests/EnclosedFlame/cmlm_net.pt
Binary file not shown.
22 changes: 22 additions & 0 deletions Exec/RegTests/EnclosedFlame/cmlm_net_info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Name of the neural network model
model_name = cmlm_dns
# Number of input dimensions
ndim = 2
# Number of output dimensions
nvar = 17
# Number of manifold parameters
nmanpar = 2
# Names of input variables
dimnames = xi0 xi1
# Names of output variables
varnames = Y-CO2 Y-CO Y-CH2O SRC_H2O SRC_H2 SRC_CO2 SRC_CO SRC_POSF10325 SRC_O2 T RHO lnRHO \
invRHO DIFF VISC SRC_xi0 SRC_xi1
# Definitions of input variables
def_xi0 = 22.34722900390625*Y-CO2 -396.7853088378906*Y-H2 53.42775344848633*Y-N2 \
23.05693817138672*Y-CO 3.7954090657876804e-05*Y-O2 5.909298488404602e-05*Y-H2O \
-8.786284161033109e-05*Y-POSF10325
def_xi1 = 2.3632654119865038e-05*Y-CO2 -0.5249142050743103*Y-H2 28.18173599243164*Y-N2 \
-29.479734420776367*Y-CO -4.5221535401651636e-05*Y-O2 71.97798156738281*Y-H2O \
-3.83632504963316e-05*Y-POSF10325
# Biases to be used calculating input variables
manibiases = -40.21234130859375 -22.204334259033203
Binary file added Exec/RegTests/EnclosedFlame/fgm_net.pnn
Binary file not shown.
Binary file added Exec/RegTests/EnclosedFlame/fgm_net.pt
Binary file not shown.
18 changes: 18 additions & 0 deletions Exec/RegTests/EnclosedFlame/fgm_net_info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Name of the neural network model
model_name = premixed
# Number of input dimensions
ndim = 1
# Number of output dimensions
nvar = 15
# Number of manifold parameters
nmanpar = 1
# Names of input variables
dimnames = xi0
# Names of output variables
varnames = Y-CO2 Y-CO Y-CH2O SRC_H2O SRC_H2 SRC_CO2 SRC_CO SRC_POSF10325 SRC_O2 T RHO lnRHO DIFF \
VISC SRC_xi0
# Definitions of input variables
def_xi0 = 15.390820503234863*Y-CO2 15.390820503234863*Y-H2 0.0*Y-N2 15.390819549560547*Y-CO \
0.0*Y-O2 15.390820503234863*Y-H2O 0.0*Y-POSF10325
# Biases to be used calculating input variables
manibiases = -2.206676721572876
Loading