# HG changeset patch # User paugier <pierre.augier@univ-grenoble-alpes.fr> # Date 1593591979 -7200 # Wed Jul 01 10:26:19 2020 +0200 # Node ID 9c55184927f289f6057c3031edb8e67dc4cf3029 # Parent 49384adc3740924c8c882e6a9aeb409299edd7be doc/examples/time_stepping/3d/ variation of the Reynolds number diff --git a/doc/examples/time_stepping/3d/run_simul.py b/doc/examples/time_stepping/3d/run_simul.py --- a/doc/examples/time_stepping/3d/run_simul.py +++ b/doc/examples/time_stepping/3d/run_simul.py @@ -83,7 +83,11 @@ default=None, ) -Re = 1600 +parser.add_argument( + "--Re", help="Reynolds number", type=float, default=1600.0, +) + + V0 = 1.0 L = 1 @@ -114,6 +118,9 @@ params.short_name_type_run = f"{args.type_time_scheme}_trunc{str_trunc_shape}{args.coef_dealiasing:.3f}" + if args.Re != 1600.0: + params.short_name_type_run += f"_Re{args.Re:.0f}" + if args.nb_pairs != 1: params.short_name_type_run += f"_nb_pairs{args.nb_pairs}" @@ -123,7 +130,7 @@ if args.cfl_coef: params.short_name_type_run += f"_cfl{args.cfl_coef}" - params.nu_2 = V0 * L / Re + params.nu_2 = V0 * L / args.Re params.init_fields.type = "in_script" diff --git a/doc/examples/time_stepping/3d/submit_1simul.py b/doc/examples/time_stepping/3d/submit_1simul.py --- a/doc/examples/time_stepping/3d/submit_1simul.py +++ b/doc/examples/time_stepping/3d/submit_1simul.py @@ -1,12 +1,12 @@ from util_submit import submit_simul -nb_proc = 10 -nx = 400 +Re = 2800 -submit_simul(2 / 3, nx, "RK4", nb_proc=nb_proc, truncation_shape="cubic") -submit_simul(1.0, nx, "RK4", nb_proc=nb_proc, truncation_shape="cubic") -submit_simul(2 / 3, nx, "RK4", nb_proc=nb_proc) -submit_simul(1.0, nx, "RK4", nb_proc=nb_proc) +nb_proc = 4 +nx = 256 +submit_simul(2 / 3, nx, "RK4", nb_proc=nb_proc, Re=Re) -submit_simul(1.0, nx, "RK2_phaseshift_random", nb_proc=nb_proc) -submit_simul(1.0, nx, "RK2_phaseshift_exact", nb_proc=nb_proc) +nx = 168 +submit_simul(1.0, nx, "RK4", nb_proc=nb_proc, Re=Re) +submit_simul(1.0, nx, "RK2_phaseshift_random", nb_proc=nb_proc, Re=Re) +submit_simul(1.0, nx, "RK2_phaseshift_exact", nb_proc=nb_proc, Re=Re) diff --git a/doc/examples/time_stepping/3d/util_submit.py b/doc/examples/time_stepping/3d/util_submit.py --- a/doc/examples/time_stepping/3d/util_submit.py +++ b/doc/examples/time_stepping/3d/util_submit.py @@ -19,6 +19,7 @@ cfl_coef=None, nb_proc=None, truncation_shape=None, + Re=None, ): nb_nodes = 1 if nb_proc is None: @@ -50,6 +51,10 @@ command += f" --truncation_shape {truncation_shape}" name_run += f"_{truncation_shape}" + if Re is not None: + command += f" --Re {Re}" + name_run += f"_Re{Re}" + print(f"submitting:\npython {command}") if not cluster: