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

pasbc3d

parent fdc4d49e
No related branches found
No related tags found
1 merge request!3Resolve "Sine and cosine transforms to solve homogeneous Neumann and Dirichlet problems"
...@@ -75,8 +75,7 @@ def compute(args): ...@@ -75,8 +75,7 @@ def compute(args):
if (dim==2): if (dim==2):
(Sc, tau, Vp, Rs, Xo, Xn, N) = (0.70, 25, 0.04, 2.0, (-600,0), (600,750), (1537, 512)) (Sc, tau, Vp, Rs, Xo, Xn, N) = (0.70, 25, 0.04, 2.0, (-600,0), (600,750), (1537, 512))
elif (dim==3): elif (dim==3):
(Sc, tau, Vp, Rs, Xo, Xn, N) = (7.00, 25, 0.04, 2.0, (-110,0,0), (65,100,100), (3073, 1024, 1024)) (Sc, tau, Vp, Rs, Xo, Xn, N) = (15.00, 25, 0.04, 2.0, (-110,0,0), (65,100,100), (3073, 1024, 1024))
N = (513,128,128)
else: else:
raise NotImplementedError raise NotImplementedError
...@@ -184,6 +183,7 @@ def compute(args): ...@@ -184,6 +183,7 @@ def compute(args):
#> Diffusion of vorticity, S and C #> Diffusion of vorticity, S and C
diffuse_S = Diffusion(implementation=impl, diffuse_S = Diffusion(implementation=impl,
enforce_implementation=False,
name='diffuse_S', name='diffuse_S',
pretty_name='diffS', pretty_name='diffS',
nu = nu_S, nu = nu_S,
...@@ -191,6 +191,7 @@ def compute(args): ...@@ -191,6 +191,7 @@ def compute(args):
variables = {S: npts}, variables = {S: npts},
dt=dt, **extra_op_kwds) dt=dt, **extra_op_kwds)
diffuse_C = Diffusion(implementation=impl, diffuse_C = Diffusion(implementation=impl,
enforce_implementation=False,
name='diffuse_C', name='diffuse_C',
pretty_name='diffC', pretty_name='diffC',
nu = nu_C, nu = nu_C,
...@@ -219,10 +220,12 @@ def compute(args): ...@@ -219,10 +220,12 @@ def compute(args):
### Build standard operators ### Build standard operators
#> Poisson operator to recover the velocity from the vorticity #> Poisson operator to recover the velocity from the vorticity
poisson = PoissonCurl(name='poisson', velocity=velo, vorticity=vorti, poisson = PoissonCurl(name='poisson',
variables={velo:npts, vorti: npts}, enforce_implementation=False,
diffusion=nu_W, dt=dt, velocity=velo, vorticity=vorti,
implementation=impl, **extra_op_kwds) variables={velo:npts, vorti: npts},
diffusion=nu_W, dt=dt,
implementation=impl, **extra_op_kwds)
#> Operator to compute the infinite norm of the velocity #> Operator to compute the infinite norm of the velocity
min_max_U = MinMaxFieldStatistics(name='min_max_U', field=velo, min_max_U = MinMaxFieldStatistics(name='min_max_U', field=velo,
...@@ -274,7 +277,7 @@ def compute(args): ...@@ -274,7 +277,7 @@ def compute(args):
) )
problem = Problem(method=method) problem = Problem(method=method)
problem.insert(poisson, dump_fields, problem.insert(poisson,
diffuse_S, diffuse_C, diffuse_S, diffuse_C,
splitting, splitting,
min_max_U, min_max_W, adapt_dt) min_max_U, min_max_W, adapt_dt)
......
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