Skip to content

Commit 0c75fdc

Browse files
committed
updated src and examples
1 parent 64fd086 commit 0c75fdc

File tree

461 files changed

+27796
-16367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

461 files changed

+27796
-16367
lines changed

examples/examples_1D/01_linear_advection/linear_advection.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"general": {
3-
"case_name": "linear_advection",
3+
"case_name": "linearadvection",
44
"save_path": "./results",
55
"end_time": 2.0,
6-
"save_dt": 0.1
6+
"save_dt": 1.0
77
},
88
"domain": {
99
"x": {
@@ -43,11 +43,5 @@
4343
},
4444
"output": {
4545
"primitives": ["density", "velocity", "pressure", "temperature"]
46-
},
47-
"nondimensionalization_parameters": {
48-
"density_reference": 1.0,
49-
"length_reference": 1.0,
50-
"velocity_reference": 1.0,
51-
"temperature_reference": 1.0
5246
}
5347
}

examples/examples_1D/01_linear_advection/numerical_setup.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
},
88
"convective_fluxes": {
99
"convective_solver": "GODUNOV",
10-
"riemann_solver": "HLLC",
11-
"signal_speed": "EINFELDT",
12-
"reconstruction_stencil": "WENO5-JS",
13-
"reconstruction_variable": "PRIMITIVE"
10+
"godunov": {
11+
"riemann_solver": "HLLC",
12+
"signal_speed": "EINFELDT",
13+
"reconstruction_stencil": "WENO5-JS",
14+
"reconstruction_variable": "PRIMITIVE"
15+
}
1416
},
1517
"dissipative_fluxes": {
1618
"reconstruction_stencil": "CENTRAL4",

examples/examples_1D/01_linear_advection/run.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,32 @@
1010
sim_manager = SimulationManager(input_manager)
1111

1212
# RUN SIMULATION
13-
simulation_buffers, time_control_variables, \
14-
forcing_parameters = initialization_manager.initialization()
15-
sim_manager.simulate(simulation_buffers, time_control_variables)
13+
jxf_buffers = initialization_manager.initialization()
14+
sim_manager.simulate(jxf_buffers)
1615

1716
# LOAD DATA
1817
path = sim_manager.output_writer.save_path_domain
1918
quantities = ["density"]
20-
cell_centers, cell_sizes, times, data_dict = load_data(path, quantities)
19+
jxf_data = load_data(path, quantities)
2120

2221
# PLOT
2322
nrows_ncols = (1,1)
2423

24+
data = jxf_data.data
25+
cell_centers = jxf_data.cell_centers
26+
times = jxf_data.times
27+
2528
# CREATE ANIMATION
2629
create_1D_animation(
27-
data_dict,
30+
data,
2831
cell_centers,
2932
times,
3033
nrows_ncols=nrows_ncols,
3134
interval=50)
3235

3336
# CREATE FIGURE
3437
create_1D_figure(
35-
data_dict,
38+
data,
3639
cell_centers=cell_centers,
3740
nrows_ncols=nrows_ncols,
3841
axis="x", axis_values=(0,0),

examples/examples_1D/02_sod_shock_tube/numerical_setup.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
"halo_cells": 5,
44
"time_integration" : {
55
"integrator": "RK3",
6-
"CFL": 0.9
6+
"CFL": 0.5
77
},
88
"convective_fluxes": {
99
"convective_solver": "GODUNOV",
10-
"riemann_solver": "HLLC",
11-
"signal_speed": "EINFELDT",
12-
"reconstruction_stencil": "WENO5-Z",
13-
"reconstruction_variable": "CHAR-PRIMITIVE"
10+
"godunov": {
11+
"riemann_solver": "HLLC",
12+
"signal_speed": "EINFELDT",
13+
"reconstruction_stencil": "WENO5-Z",
14+
"reconstruction_variable": "CHAR-PRIMITIVE"
15+
}
1416
},
1517
"dissipative_fluxes": {
1618
"reconstruction_stencil": "CENTRAL4",

examples/examples_1D/02_sod_shock_tube/run.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,23 @@
1010
sim_manager = SimulationManager(input_manager)
1111

1212
# RUN SIMULATION
13-
simulation_buffers, time_control_variables, \
14-
forcing_parameters = initialization_manager.initialization()
15-
sim_manager.simulate(simulation_buffers, time_control_variables)
13+
jxf_buffers = initialization_manager.initialization()
14+
sim_manager.simulate(jxf_buffers)
1615

1716
# LOAD DATA
1817
path = sim_manager.output_writer.save_path_domain
1918
quantities = ["density", "velocity", "pressure"]
20-
cell_centers, cell_sizes, times, data_dict = load_data(path, quantities)
19+
jxf_data = load_data(path, quantities)
20+
21+
data = jxf_data.data
22+
cell_centers = jxf_data.cell_centers
23+
times = jxf_data.times
2124

2225
# PLOT
2326
plot_dict = {
24-
"density": data_dict["density"],
25-
"velocityX": data_dict["velocity"][:,0],
26-
"pressure": data_dict["pressure"]
27+
"density": data["density"],
28+
"velocityX": data["velocity"][:,0],
29+
"pressure": data["pressure"]
2730
}
2831
nrows_ncols = (1,3)
2932

examples/examples_1D/02_sod_shock_tube/sod.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@
5050
"specific_gas_constant": 1.0
5151
}
5252
},
53-
"nondimensionalization_parameters": {
54-
"density_reference": 1.0,
55-
"length_reference": 1.0,
56-
"velocity_reference": 1.0,
57-
"temperature_reference": 1.0
58-
},
5953
"output": {
6054
"primitives": ["density", "velocity", "pressure", "temperature"]
6155
}

examples/examples_1D/03_lax_shock_tube/numerical_setup.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"conservatives": {
3-
"halo_cells": 4,
3+
"halo_cells": 5,
44
"time_integration" : {
55
"integrator": "RK3",
6-
"CFL": 0.9
6+
"CFL": 0.5
77
},
88
"convective_fluxes": {
99
"convective_solver": "FLUX-SPLITTING",
10-
"flux_splitting": "ROE",
11-
"reconstruction_stencil": "WENO5-JS",
12-
"frozen_state": "ROE"
10+
"flux_splitting": {
11+
"flux_splitting": "ROE",
12+
"reconstruction_stencil": "WENO6-CU"
13+
}
1314
},
1415
"dissipative_fluxes": {
1516
"reconstruction_stencil": "CENTRAL4",
@@ -28,6 +29,7 @@
2829
"is_double_precision_output": true
2930
},
3031
"output": {
32+
"is_xdmf": false,
3133
"derivative_stencil": "CENTRAL4"
3234
}
33-
}
35+
}

examples/examples_1D/03_lax_shock_tube/run.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,23 @@
1010
sim_manager = SimulationManager(input_manager)
1111

1212
# RUN SIMULATION
13-
simulation_buffers, time_control_variables, \
14-
forcing_parameters = initialization_manager.initialization()
15-
sim_manager.simulate(simulation_buffers, time_control_variables)
13+
jxf_buffers = initialization_manager.initialization()
14+
sim_manager.simulate(jxf_buffers)
1615

1716
# LOAD DATA
1817
path = sim_manager.output_writer.save_path_domain
1918
quantities = ["density", "velocity", "pressure"]
20-
cell_centers, cell_sizes, times, data_dict = load_data(path, quantities)
19+
jxf_data = load_data(path, quantities)
20+
21+
data = jxf_data.data
22+
cell_centers = jxf_data.cell_centers
23+
times = jxf_data.times
2124

2225
# PLOT
2326
plot_dict = {
24-
"density": data_dict["density"],
25-
"velocityX": data_dict["velocity"][:,0],
26-
"pressure": data_dict["pressure"]
27+
"density": data["density"],
28+
"velocityX": data["velocity"][:,0],
29+
"pressure": data["pressure"]
2730
}
2831
nrows_ncols = (1,3)
2932

examples/examples_1D/04_double_rarefaction/double_rarefaction.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,5 @@
4646
},
4747
"output": {
4848
"primitives": ["density", "velocity", "pressure", "temperature"]
49-
},
50-
"nondimensionalization_parameters": {
51-
"density_reference": 1.0,
52-
"length_reference": 1.0,
53-
"velocity_reference": 1.0,
54-
"temperature_reference": 1.0
5549
}
5650
}

examples/examples_1D/04_double_rarefaction/numerical_setup.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
},
88
"convective_fluxes": {
99
"convective_solver": "GODUNOV",
10-
"riemann_solver": "HLLC",
11-
"signal_speed": "EINFELDT",
12-
"reconstruction_stencil": "WENO5-JS",
13-
"reconstruction_variable": "PRIMITIVE"
10+
"godunov": {
11+
"riemann_solver": "HLLC",
12+
"signal_speed": "EINFELDT",
13+
"reconstruction_stencil": "WENO5-JS",
14+
"reconstruction_variable": "PRIMITIVE"
15+
}
1416
},
1517
"dissipative_fluxes": {
1618
"reconstruction_stencil": "CENTRAL4",

0 commit comments

Comments
 (0)