-
Notifications
You must be signed in to change notification settings - Fork 0
Machine Learning Data Generation Dynamics Emulator
Matt Norman edited this page Jul 17, 2020
·
9 revisions
Use the following const.h
, really just make sure ord and tord are both 3.
...
int constexpr ord = 3;
int constexpr tord = 3;
...
Use the following input.txt
:
// Input parameters for the model
// Legal syntax is key : value
// You can end input key:value lines with comments
nx : 200 // Number of cells in the x-direction
ny : 1 // Number of cells in the y-direction
nz : 100 // Number of cells in the z-direction
xlen : 20000. // Domain length in the x-direction (m)
ylen : 20000. // Domain length in the y-direction (m)
zlen : 10000. // Domain length in the z-direction (m)
cfl : 0.8 // CFL value to use
simLength : 2000. // How long to simulation (s)
parNx : 1 // Number of parallel tasks in the x-direction
parNy : 1 // Number of parallel tasks in the y-direction
outFreq : 0.0001 // Frequency for output in seconds
doWeno : 1 // Whether to do WENO
strakaVisc : 0 // Whether to apply Straka 2nd-order viscosity
// Initial data to use
// thermal : Rising thermal (neutral atmosphere)
// collision: Colliding cold and warm bubbles (neutral atmosphere)
// straka : Falling cold bubble
dataInit : collision
// Temporal discretization to use:
// ADER: ADER with Differential Transforms (max cfl = 1)
// SSPRK3: optimal 3-stage, 3rd order SSPRK (max cfl = 1)
timeMethod : ADER
// Equation set to use:
// theta_cons: q={rho,rho*u,rho*v,rho*w,rho*theta}, conservative
// theta_prim: q={rho,u,v,w,theta}, non-conservative
eqnSet : theta_cons
make -j
./cloudFV
# Install NCO
ncks -d t,7500,8500 output.nc ml_training.nc
- Read in
density
,u
,w
, andtheta
using the pythonnetCDF4
package - Randomly choose a set of
N
cases to train, each from a random cell of the domain[1,198] x [1,98]
(to avoid the edge cells) and a random time step of the domain[0,nt-1]
.- For this sample:
- Save
density
,u
,w
, andtheta
in a3x3
-cell stencil centered on the cell in question as input - Save
density
,u
,w
, andtheta
at the next time step only in the center cell as output
- Save
- For this sample: