Skip to content
Snippets Groups Projects
Commit 8d295d2b authored by Jean-Baptiste Keck's avatar Jean-Baptiste Keck
Browse files

update levelset example

parent 880d668c
No related branches found
No related tags found
1 merge request!3Resolve "Sine and cosine transforms to solve homogeneous Neumann and Dirichlet problems"
Pipeline #17170 canceled
......@@ -8,7 +8,7 @@ TANK_RATIO = 1
FILL_PCT = 0.25
SEDIMENT_RADIUS = 5e-3
SEDIMENT_COUNT = int(1.15*(FILL_PCT*TANK_RATIO / (np.pi*SEDIMENT_RADIUS**2)))
DISCRETIZATION = 2048
DISCRETIZATION = 256
BLOB_INIT = False
NB = 5
......@@ -322,7 +322,7 @@ def compute(args):
**extra_op_kwds)
#> Operator to compute and save mean fields
axes = list(range(0, dim-1))
axes = list(range(1, dim))
view = [slice(None,None,None),]*dim
view = tuple(view)
io_params = IOParams(filename='horizontally_averaged_profiles', frequency=0)
......@@ -334,7 +334,7 @@ def compute(args):
### Adaptive timestep operator
adapt_dt = AdaptiveTimeStep(dt, equivalent_CFL=True,
name='merge_dt', pretty_name='dt',
max_dt=1)
max_dt=1e-1)
dt_cfl = adapt_dt.push_cfl_criteria(cfl=args.cfl,
Finf=min_max_U.Finf,
equivalent_CFL=True,
......@@ -430,8 +430,8 @@ if __name__=='__main__':
npts=(TANK_RATIO*DISCRETIZATION+1,DISCRETIZATION+1),
box_origin=(0.0,), box_length=(1.0,),
tstart=0.0, tend=100.1,
dt=1e-6, cfl=8.00, lcfl=0.50,
dump_times=tuple(float(5*x) for x in range(20)),
dt=1e-6, cfl=0.50, lcfl=0.50,
dump_times=tuple(float(1*x) for x in range(100)),
dump_freq=0)
parser.run(compute)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment