Skip to content

Commit 0342538

Browse files
committed
Changes in hardcoded fpp description
1 parent d14900c commit 0342538

File tree

3 files changed

+13
-22
lines changed

3 files changed

+13
-22
lines changed

examples/2D_Detonation/case.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
u_l = 0
2020
u_r = -487.34
2121

22-
L = 0.12
22+
L = 0.24
2323
Nx = 800
2424
Ny = 200
2525
dx = L / Nx
@@ -32,10 +32,8 @@
3232
NS = NT // SAVE_COUNT
3333

3434
case = {
35-
# Logistics ================================================================
3635
"run_time_info": "T",
37-
# ==========================================================================
38-
# Computational Domain Parameters ==========================================
36+
# Computational Domain Parameters
3937
"x_domain%beg": 0,
4038
"x_domain%end": L,
4139
"y_domain%beg": 0,
@@ -49,7 +47,7 @@
4947
"t_step_save": 1,
5048
"t_step_print": 1,
5149
"parallel_io": "F", # if args.mfc.get("mpi", True) else 'F',
52-
# Simulation Algorithm Parameters ==========================================
50+
# Simulation Algorithm Parameters
5351
"model_eqns": 2,
5452
"num_fluids": 1,
5553
"num_patches": 2,
@@ -68,18 +66,16 @@
6866
"bc_x%end": -3,
6967
"bc_y%beg": -1,
7068
"bc_y%end": -1,
71-
# Chemistry ================================================================
69+
# Chemistry
7270
"chemistry": "T" if not args.chemistry else "T",
7371
"chem_params%diffusion": "F",
7472
"chem_params%reactions": "F",
7573
"cantera_file": ctfile,
76-
# ==========================================================================
77-
# Formatted Database Files Structure Parameters ============================
74+
# Formatted Database Files Structure Parameters
7875
"format": 1,
7976
"precision": 2,
8077
"prim_vars_wrt": "T",
8178
"chem_wrt_T": "T",
82-
# ==========================================================================
8379
"patch_icpp(1)%geometry": 3,
8480
"patch_icpp(1)%x_centroid": L / 2,
8581
"patch_icpp(1)%y_centroid": L / 8,
@@ -90,9 +86,6 @@
9086
"patch_icpp(1)%pres": sol_R.P,
9187
"patch_icpp(1)%alpha(1)": 1,
9288
"patch_icpp(1)%alpha_rho(1)": sol_R.density,
93-
# ==========================================================================
94-
# ==========================================================================
95-
# ==========================================================================
9689
"patch_icpp(2)%geometry": 7,
9790
"patch_icpp(2)%x_centroid": L / 4,
9891
"patch_icpp(2)%y_centroid": L / 8,
@@ -101,21 +94,19 @@
10194
"patch_icpp(2)%hcid": 270,
10295
"patch_icpp(2)%vel(1)": 0,
10396
"patch_icpp(2)%vel(2)": 0,
104-
"patch_icpp(2)%pres": sol_R.P,
97+
"patch_icpp(2)%pres": sol_L.P,
10598
"patch_icpp(2)%alpha(1)": 1,
106-
"patch_icpp(2)%alpha_rho(1)": sol_R.density,
107-
# 'patch_icpp(1)%alter_patch(1)' : 'F',
99+
"patch_icpp(2)%alpha_rho(1)": sol_L.density,
108100
"patch_icpp(2)%alter_patch(1)": "T",
109-
# ==========================================================================
110101
# Fluids Physical Parameters ===============================================
111102
"fluid_pp(1)%gamma": 1.0e00 / (4.4e00 - 1.0e00),
112103
"fluid_pp(1)%pi_inf": 0,
113-
# ==========================================================================
114104
}
115105

116106
if args.chemistry:
117107
for i in range(len(sol_L.Y)):
118108
case[f"chem_wrt_Y({1})"] = "T"
109+
case[f"patch_icpp(1)%Y({i+1})"] = sol_R.Y[i]
119110

120111
if __name__ == "__main__":
121112
print(json.dumps(case))

src/pre_process/include/2dHardcodedIC.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
!>
55
!> @details
66
!> Reads a sequence of 1D primitive-variable files and maps them onto
7-
!> a 2D domain along the x-direction. Parameters control file counts,
8-
!> grid resolution, and domain offsets.
7+
!> a 2D domain along the x-direction. These files are produced when parallel I/O is disabled in `case.py`.
8+
!> Parameters control file counts, grid resolution, and domain offsets.
99
!>
1010
!> @param nFiles Number of primitive-variable files to read
1111
!> @param nRows Number of grid points per row
@@ -28,7 +28,7 @@
2828
real(wp), dimension(nRows) :: x_coords
2929
logical :: files_loaded = .false.
3030
real(wp) :: domain_start, domain_end
31-
character(len=*), parameter :: init_dir = "/MFC/examples/1D_reactive_shocktube/D/"
31+
character(len=*), parameter :: init_dir = "/home/pain/MFC-Adam/examples/1D_reactive_shocktube/D/"
3232
character(len=20) :: file_num_str ! For storing the file number as a string
3333
character(len=20) :: zeros_part ! For the trailing zeros part
3434
character(len=6), parameter :: zeros_default = "018681" ! Default zeros (can be changed)

src/pre_process/include/3dHardcodedIC.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
!>
44
!> @details
55
!> Reads a 2D primitive-variable dataset and replicates it across the third
6-
!> dimension (z). Parameters control file counts (number of primitive variables),
7-
!> grid resolution, and domain offsets in x, and y.
6+
!> dimension (z), these files are produced when parallel I/O is disabled in `case.py`.
7+
!> Parameters control file counts (number of primitive variables) grid resolution, and domain offsets in x, and y.
88
!>
99
!> @param nFiles Number of primitive-variable files to read
1010
!> @param xRows Number of grid points in the x-direction

0 commit comments

Comments
 (0)