Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Generate configuration for defining a physics-informed neural network for modeling the |
# fluid properties of siloxane MM in NICFD with the data-driven fluid model in SU2. |
# |
# Version: 2.0.0 |
# Version: 3.0.0 |
# |
#=============================================================================================#

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Initate physics-informed machine learning process for training the neural network used to |
# model the fluid properties of siloxane MM in NICFD with the SU2 data-driven fluid model. |
# |
# Version: 2.0.0 |
# Version: 3.0.0 |
# |
#=============================================================================================#

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## \file 3:run_SU2.py
# \brief NICFD simulation of supersonic expansion of siloxane MM.
# \version 8.1.0 "Harrier"
# \version 8.3.0 "Harrier"
#
# SU2 Project Website: https://su2code.github.io
#
Expand All @@ -26,9 +26,7 @@

import numpy as np
import gmsh
import pysu2
import CoolProp.CoolProp as CP
from mpi4py import MPI
from su2dataminer.config import Config_NICFD


Expand All @@ -54,18 +52,6 @@ def WriteSU2Config(Config:Config_NICFD):

# SU2 config options for NICFD nozzle simulation.
su2_options = """
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% SU2 configuration file, automatically generated with "3:run_SU2.py" %
% Case description: Non-ideal compressible fluid flow in a converging- %
% diverging supersonic nozzle using a PINN for thermodynamic %
% state calculations. %
% Author: Evert Bunschoten %
% Institution: Delft University of Technology %
% Date: 2025.3.26 %
% File Version 8.1.0 "Harrier" %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SOLVER= RANS
KIND_TURB_MODEL= SA
SA_OPTIONS= NONE
Expand Down Expand Up @@ -243,26 +229,16 @@ def GenerateMesh():

return mesh_filename

comm = MPI.COMM_WORLD
rank = comm.Get_rank()
# Load SU2 DataMiner configuration.
Config = Config_NICFD("SU2DataMiner_MM.cfg")

if rank == 0:
# Load SU2 DataMiner configuration.
Config = Config_NICFD("SU2DataMiner_MM.cfg")
# Write SU2 configuration options.
su2_options = WriteSU2Config(Config)

# Write SU2 configuration options.
su2_options = WriteSU2Config(Config)
# Generate computational mesh.
mesh_filename = GenerateMesh()
su2_options = su2_options.replace("__MESH_FILENAME__", mesh_filename)

# Generate computational mesh.
mesh_filename = GenerateMesh()
su2_options = su2_options.replace("__MESH_FILENAME__", mesh_filename)

# Write SU2 configuration file.
with open("config_NICFD_PINN.cfg", "w") as fid:
fid.write(su2_options)
comm.Barrier()

# Initialize NICFD simulation.
driver = pysu2.CSinglezoneDriver("config_NICFD_PINN.cfg",1, comm)
driver.StartSolver()
driver.Finalize()
# Write SU2 configuration file.
with open("config_NICFD_PINN.cfg", "w") as fid:
fid.write(su2_options)
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% SU2 configuration file, automatically generated with "3:run_SU2.py" %
% Case description: Non-ideal compressible fluid flow in a converging- %
% diverging supersonic nozzle using a PINN for thermodynamic %
% state calculations. %
% Author: Evert Bunschoten %
% Institution: Delft University of Technology %
% Date: 2025.3.26 %
% File Version 8.1.0 "Harrier" %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


SOLVER= RANS
KIND_TURB_MODEL= SA
SA_OPTIONS= NONE
MATH_PROBLEM= DIRECT
RESTART_SOL=NO
MACH_NUMBER= 0.05
AoA= 0.0

FREESTREAM_PRESSURE= 1.809444e+06
FREESTREAM_PRESSURE= 1.802104e+06

FREESTREAM_TEMPERATURE= 5.229862e+02
FREESTREAM_TEMPERATURE= 5.229359e+02

FREESTREAM_TURBULENCEINTENSITY = 0.1

Expand Down Expand Up @@ -49,17 +37,15 @@ PRANDTL_TURB=8.25e-01

MARKER_HEATFLUX= (wall, 0.0)

MARKER_MONITORING=(wall)

MARKER_EULER=(symmetry)

MARKER_GILES= (inflow, TOTAL_CONDITIONS_PT, 1.809444e+06, 5.229862e+02, 1.0, 0.0, 0.0, 0.8, 0.8,\
outflow, STATIC_PRESSURE,1.809444e+05, 0.0, 0.0, 0.0, 0.0, 0.8, 0.8)
MARKER_GILES= (inflow, TOTAL_CONDITIONS_PT, 1.802104e+06, 5.229359e+02, 1.0, 0.0, 0.0, 0.8, 0.8, outflow, STATIC_PRESSURE,1.802104e+05, 0.0, 0.0, 0.0, 0.0, 0.8, 0.8)
SPATIAL_FOURIER=NO
TURBOMACHINERY_KIND= AXIAL
TURBO_PERF_KIND=TURBINE
RAMP_OUTLET=NO
RAMP_OUTLET_COEFF= (1.809444e+06, 10, 200)
RAMP_OUTLET=YES
RAMP_OUTLET_COEFF= (1.802104e+06, 10, 200)
AVERAGE_PROCESS_KIND= AREA
MIXEDOUT_COEFF=(0.1, 1e-5, 15.0)
MARKER_TURBOMACHINERY= (inflow, outflow)
Expand Down Expand Up @@ -93,7 +79,7 @@ CONV_RESIDUAL_MINVAL= -16
CONV_STARTITER= 10
CONV_CAUCHY_ELEMS= 100
CONV_CAUCHY_EPS= 1E-6
CONV_FILENAME=history_adjoint.csv

MESH_FILENAME= nozzle_mesh.su2

OUTPUT_WRT_FREQ= 20
Expand Down