from param import Param from grid import Grid from fluid2d import Fluid2d import numpy as np param = Param('default.xml') param.modelname = 'euler' param.expname = 'freedecay' # domain and resolution param.nx = 64 * 2 param.ny = param.nx param.Ly = param.Lx param.npx = 1 param.npy = 1 param.geometry = 'perio' # time param.tend = 1200. param.cfl = 1.2 param.adaptable_dt = True param.dt = .05 param.dtmax = 10. # discretization param.order = 5 # output param.var_to_save = ['vorticity', 'psi', 'tracer'] param.list_diag = 'all' param.freq_plot = 5
from grid import Grid from fluid2d import Fluid2d import numpy as np param = Param('default.xml') param.modelname = 'quasigeostrophic' param.expname = 'vortex_topo_0' # domain and resolution ratio = 2 param.nx = 64 * 4 param.ny = param.nx // ratio param.npx = 1 param.npy = 1 param.Lx = 2. param.Ly = param.Lx / ratio param.geometry = 'perio' # time param.tend = 50. param.cfl = 0.8 param.adaptable_dt = True param.dt = 1. param.dtmax = 100. # discretization param.order = 5 param.flux_splitting_method = 'minmax' # output param.ageostrophic = True
from param import Param from grid import Grid from fluid2d import Fluid2d import numpy as np param = Param("toto") param.modelname = 'sqg' param.expname = 'sqg_vortex' # domain and resolution param.nx = 64 * 2 param.ny = param.nx param.npy = 1 param.Lx = 1. param.Ly = 1. param.geometry = 'perio' # time param.tend = 40 param.cfl = 0.8 param.adaptable_dt = True param.dt = 1. param.dtmax = 100. # discretization param.order = 5 # output param.ageostrophic = False param.var_to_save = ['pv', 'psi', 'u', 'v', 'vorticity'] param.list_diag = ['pv', 'pv2']
param = Param('default.xml') # the xml file contains all the defaults values + a doc on variable param.modelname = 'euler' # advection, euler, boussinesq, quasigeostrophic param.expname = 'myfirstexp' # string used to name the netcdf files: # expname_his.nc and expname_diag.nc # *** domain and resolution *** param.nx = 32*2 # nb of grid points, should of the form 2**p, 2**p*3 or 2**p*5 param.ny = 32 # idem param.npy=4 # nb of processors in y: should be a power of 2 param.Lx = 2. # domain size in x [Lx can be dimensional if the user # wishes] param.Ly = param.Lx/2 # domain size in y. The model imposes that dx=dy # => Lx/nx = Ly/ny param.geometry='square' # square, disc, xchannel, ychannel, # perio. 'square' is a closed domain. For a # more complex domain, adjust the grid.msk # once grid is available # *** time *** param.tend=4e4 # time of integration [could be dimensional of not] param.adaptable_dt=True param.cfl=1. # desired cfl if adaptable_dt=True param.dt = 1. # desired dt if adaptable_dt=False