Skip to content

Commit

Permalink
Merge pull request #245 from pmgbergen/update_benchmark3d_post_process
Browse files Browse the repository at this point in the history
update the post process scripts for the benchmark 3d
  • Loading branch information
alessiofumagalli committed Apr 1, 2019
2 parents ea6c75a + 35c8883 commit bcdc83b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions examples/papers/arXiv_1809_06926/case1/post_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def cot_domain(transport_root, file_in, step, field, fields, padding=6):
transport_root = folder+"tracer_3_"

# in this file the constant data are saved
file_in = folder+"sol_3.vtu"
file_in = folder+"sol_3_000000.vtu"
fields = ["cell_volumes", "aperture", "bottom_domain"]
phi = 0.25
cot_matrix = phi * cot_domain(transport_root, file_in, step, field, fields)
Expand All @@ -131,7 +131,7 @@ def cot_domain(transport_root, file_in, step, field, fields, padding=6):
transport_root = folder+"tracer_2_"

# in this file the constant data are saved
file_in = folder+"sol_2.vtu"
file_in = folder+"sol_2_000000.vtu"
fields = ["cell_volumes", "aperture"]
phi = 0.4
cot_fracture = phi * cot_domain(transport_root, file_in, step, field, fields)
Expand All @@ -155,7 +155,7 @@ def cot_domain(transport_root, file_in, step, field, fields, padding=6):

field_0 = "pressure"
# file of the matrix
file_in = folder+"sol_3.vtu"
file_in = folder+"sol_3_000000.vtu"
file_tmp = folder+"tmp0.csv"
pts = [[0, 100, 100], [100, 0, 0]]

Expand Down
4 changes: 2 additions & 2 deletions examples/papers/arXiv_1809_06926/case2/post_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def cot_domain(transport_root, file_in, step, field, fields, num_colors, padding

field = "pressure"
# file of both the matrix and the fracture
file_in = folder + "sol_3.vtu"
file_in = folder + "sol_3_000000.vtu"
file_out = folder + "dol_perm_"+ perm + "_refinement_" + refinement + ".csv"
pts = [[0, 0, 0], [1, 1, 1]]

Expand All @@ -151,7 +151,7 @@ def cot_domain(transport_root, file_in, step, field, fields, num_colors, padding
# 4) for the coarsest mesh the averaged concentration on each matrix block
if refinement == "1":
transport_root = folder+"tracer_3_"
file_in = folder+"sol_3.vtu"
file_in = folder+"sol_3_000000.vtu"
fields = ["cell_volumes"]
field = "tracer"
step = 101
Expand Down
2 changes: 1 addition & 1 deletion examples/papers/arXiv_1809_06926/case3/post_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def write_csv(file_out, fields, data):

field = "pressure"
# file of the matrix
file_in = folder+"sol_3.vtu"
file_in = folder+"sol_3_000000.vtu"

file_out = folder+"dol_line_0_refinement_"+idx+".csv"
pts = [[0.5, 1.1, 0], [0.5, 1.1, 1]]
Expand Down
9 changes: 4 additions & 5 deletions examples/papers/arXiv_1809_06926/case4/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def summarize_data(solver_names):

def main(folder, solver, solver_name, dt):

gb, domain = problem_data.create_grid(from_file=True)
gb, domain = problem_data.create_grid(from_file=False, generate_network=True)

data = {"domain": domain, "t_max": 5000}
data["time_step"] = dt
Expand Down Expand Up @@ -108,13 +108,12 @@ def main(folder, solver, solver_name, dt):

if __name__ == "__main__":
solver_list = [
# solvers.solve_tpfa,
# solvers.solve_mpfa,
solvers.solve_tpfa,
solvers.solve_mpfa,
solvers.solve_vem,
solvers.solve_rt0,
]
# solver_names = ["tpfa", "mpfa", "vem", "rt0"]
solver_names = ["vem", "rt0"]
solver_names = ["tpfa", "mpfa", "vem", "rt0"]

time_step = 50
for solver, solver_name in zip(solver_list, solver_names):
Expand Down
2 changes: 1 addition & 1 deletion examples/papers/arXiv_1809_06926/case4/post_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def write_csv(file_out, fields, data):

field = "pressure"
# file of the matrix
file_in = folder+"sol_3.vtu"
file_in = folder+"sol_3_000000.vtu"

file_out = folder+"dol_line_0.csv"
pts = [[350, 100, -100], [-500, 1500, 500]]
Expand Down

0 comments on commit bcdc83b

Please sign in to comment.