1 0 GfsWave GfsBox GfsGEdge {} {
Refine 6
Time { end = 120 }
PhysicalParams { L = 5000 }
Global {
static double gaussian (double f, double fmean, double fsigma) {
return exp (-((f - fmean)*(f - fmean))/(2.*fsigma*fsigma));
}
static double costheta (double theta, double thetam, double thetapower) {
double a = cos (theta - thetam);
return a > 0. ? pow (a, thetapower) : 0.;
}
}
InitWave {} {
return gaussian (Frequency, 0.1, 0.02)*
costheta (Direction, 30.*M_PI/180., 2.);
} {
x -= -2000.;
y -= -2000.;
double Hsmax = 2.5;
double E = (Hsmax*Hsmax/16.)*gaussian (sqrt (x*x + y*y), 0., 150.);
return 4.*sqrt (E);
}
AdaptGradient { istep = 1 } { cmax = 0.04 minlevel = MINLEVEL maxlevel = 6 } Hs
OutputTime { istep = 1 } log-MINLEVEL-NTHETA
OutputScalarStats { step = 12 } hs-MINLEVEL-NTHETA { v = Hs }
OutputSimulation { step = 12 } sim-MINLEVEL-NTHETA-%g.gfs
EventScript { step = 12 } { gzip -f sim-*-*-*.gfs }
OutputSimulation { start = end } end-MINLEVEL-NTHETA.gfs
EventScript { start = end } { gzip -f end-*-*.gfs }
OutputPPM { step = 12 } { ppm2mpeg > hs-MINLEVEL-NTHETA.mpg } { v = Hs maxlevel = 7 }
} {
ntheta = NTHETA
}
GfsBox {}