Read about our upcoming Code of Conduct on this issue

Commit 1b12bbe6 authored by Pierre Augier's avatar Pierre Augier
Browse files

After looking for a problem for Milestone simulations

parent be50c292a229
Pipeline #23927 passed with stage
in 15 minutes and 5 seconds
......@@ -64,7 +64,7 @@ parser.add_argument(
parser.add_argument(
"-np",
"--n_periods",
type=int,
type=float,
default=5,
help="Number of periods",
)
......@@ -97,6 +97,7 @@ def main(args):
assert nx == nx_float
dx = lx / nx
mpi.printby0(f"{dx = }")
lz = params.oper.Lz = mesh
params.oper.nz = round(lz / dx)
......@@ -107,12 +108,15 @@ def main(args):
params.forcing.enable = True
params.forcing.type = "milestone"
params.forcing.milestone.nx_max = 64
params.forcing.milestone.nx_max = min(nx, round(16 * number_cylinders * nx / ny))
mpi.printby0(f"{params.forcing.milestone.nx_max = }")
objects = params.forcing.milestone.objects
objects.number = number_cylinders
objects.diameter = diameter
objects.width_boundary_layers = 0.1
objects.width_boundary_layers = 0.02
assert objects.width_boundary_layers < diameter / 4
movement = params.forcing.milestone.movement
......@@ -132,7 +136,8 @@ def main(args):
)
params.time_stepping.t_end = movement.period * args.n_periods
params.time_stepping.deltat_max = 0.02 * diameter / speed
params.time_stepping.deltat_max = 0.04 * diameter / speed
mpi.printby0(f"{params.time_stepping.deltat_max = }")
params.nu_2 = 1e-6
......
......@@ -105,6 +105,9 @@ except ImportError:
del util
# useful alias
load = load_sim_for_plot
__citation__ = r"""
@article{fluiddyn,
doi = {10.5334/jors.237},
......@@ -142,6 +145,7 @@ journal = {Journal of Open Research Software}
__all__ = [
"__version__",
"available_solver_keys",
"get_local_version",
"path_dir_results",
"import_module_solver_from_key",
......@@ -149,6 +153,7 @@ __all__ = [
"load_sim_for_plot",
"load_state_phys_file",
"modif_resolution_from_dir",
"modif_resolution_from_dir_memory_efficient",
"modif_resolution_all_dir",
"load_params_simul",
"load_for_restart",
......
......@@ -61,5 +61,9 @@ def import_cls_simul(key, entrypoint_grp):
The name of the entrypoint group listing the solvers.
"""
if key.startswith(entrypoint_grp + "."):
key = key[len(entrypoint_grp) + 1:]
solver = import_module_solver(key, entrypoint_grp)
return solver.Simul
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment