GfsInit
From Gerris
GfsInit can be used to set initial conditions for a set of variables.
The syntax in parameter files is:
[ GfsGenericInit ] { V1 = [ GfsFunction ] V2 = [ GfsFunction ] … }
where V1, V2,… are variable names.
If the variables do not already exist at the time of initialisation, they are created.
Examples
- B\'enard--von K\'arm\'an Vortex Street for flow around a cylinder at Re=160
- Vortex street around a "heated" cylinder
- Turbulent air flow around RV Tangaroa
- Lunar tides in Cook Strait, New Zealand
- Air-water flow around a Series 60 cargo ship
- Convergence of the Poisson solver
- Convergence with a refined circle
- Convergence of the Poisson solver with solid boundaries
- Star-shaped solid boundary with refinement
- Star-shaped solid boundary
- Thin wall at box boundary
- Poisson solution in a dumbbell-shaped domain
- Convergence of the Godunov advection scheme
- Time-reversed VOF advection in a shear flow
- Time-reversed advection with curvature-based refinement
- Estimation of the numerical viscosity
- Estimation of the numerical viscosity with refined box
- Convergence for a simple periodic problem
- Potential flow around a sphere
- Viscous flow past a sphere
- Mass conservation
- Mass conservation with solid boundary
- Momentum conservation for large density ratios
- Hydrostatic balance with quadratic pressure profile
- Convergence of a potential flow solution
- Flow through a divergent channel
- Potential flow around a thin plate
- Circular droplet in equilibrium
- Axisymmetric spherical droplet in equilibrium
- Geostrophic adjustment
- Geostrophic adjustment on a beta-plane
- Coastally-trapped waves
- Coastally-trapped waves with adaptive refinement
- Gravity waves in a realistic ocean basin
Init {} { U = 1 }
Init {} { U = 1 }
Init {} { U = 1. }
Init {} {
A_amp = AM2.gts
B_amp = BM2.gts
}
Init { istep = 1 } {
U = U/(1. + dt*Velocity*4e-4/H)
V = V/(1. + dt*Velocity*4e-4/H)
}
Init {} { U = FROUDE }
Init {} {
Div = {
int k = 3, l = 3;
return -M_PI*M_PI*(k*k + l*l)*sin (M_PI*k*x)*sin (M_PI*l*y);
}
}
Init {} {
Div = {
int k = 3, l = 3;
return -M_PI*M_PI*(k*k + l*l)*sin (M_PI*k*x)*sin (M_PI*l*y);
}
}
Init {} {
Div = {
int k = 3, l = 3;
return -M_PI*M_PI*(k*k + l*l)*sin (M_PI*k*x)*sin (M_PI*l*y);
}
}
Init {} {
Div = {
int k = 3, l = 3;
return -M_PI*M_PI*(k*k + l*l)*sin (M_PI*k*x)*sin (M_PI*l*y);
}
}
Init {} {
Div = {
int k = 3, l = 3;
return -M_PI*M_PI*(k*k + l*l)*sin (M_PI*k*x)*sin (M_PI*l*y);
}
}
Init {} {
Div = {
int k = 3, l = 3;
x = (x - 0.5)/2.;
y = (y + 0.5)/2.;
return -M_PI*M_PI*(k*k + l*l)*sin (M_PI*k*x)*sin (M_PI*l*y);
}
}
Init {} { Div = y }
Init {} {
U = -8.*y
V = 8.*x
T = {
double r2 = x*x + y*y;
double coeff = 20. + 20000.*r2*r2*r2*r2;
return (1. + cos(20.*x)*cos(20.*y))*exp(-coeff*r2)/2.;
}
}
Init {} {
U = sin((x + 0.5)*M_PI)*cos((y + 0.5)*M_PI)
V = -cos((x + 0.5)*M_PI)*sin((y + 0.5)*M_PI)
}
Init { start = 2.5 } { U = -U V = -V }
Init {} {
U = sin((x + 0.5)*M_PI)*cos((y + 0.5)*M_PI)
V = -cos((x + 0.5)*M_PI)*sin((y + 0.5)*M_PI)
}
Init { start = 2.5 } { U = -U V = -V }
Init {} {
U = (- cos (2.*M_PI*x)*sin (2.*M_PI*y))
V = (sin (2.*M_PI*x)*cos (2.*M_PI*y))
}
Init {} {
U = (- cos (8.*M_PI*x)*sin (8.*M_PI*y))
V = (sin (8.*M_PI*x)*cos (8.*M_PI*y))
}
Init {} {
U = (1. - 2.*cos (2.*M_PI*x)*sin (2.*M_PI*y))
V = (1. + 2.*sin (2.*M_PI*x)*cos (2.*M_PI*y))
}
Init {} {
U = U0
Phi = {
double r = sqrt (cx*cx + cy*cy);
return U0*A0*A0*A0*cx/(2.*r*r*r);
}
}
Init {} { U = U0 }
Init {} { U = 1 }
Init {} { U = 1 }
Init {} { U = T }
Init {} { rho = (cy + 0.5) }
Init {} { U = 1 }
Init {} { U = 1 }
Init {} { U = 1 }
Init {} { Tref = T }
Init {} { Tref = T }
Init {} {
# e-folding radius = 100 km
# umax = 0.5 m/s = sqrt(200)*exp(-1/2)
U = (5.667583815e-4*200.*y*exp (-100.*(x*x + y*y)))
V = (- 5.667583815e-4*200.*x*exp (-100.*(x*x + y*y)))
P = (5.667583815e-4*exp (-100.*(x*x + y*y)))
H = 1
}
Init {} {
# e-folding radius = 100 km
# umax = 0.5 m/s = sqrt(200)*exp(-1/2)
U = (5.667583815e-4*200.*y*exp (-100.*(x*x + y*y)))
V = (- 5.667583815e-4*200.*x*exp (-100.*(x*x + y*y)))
P = (5.667583815e-4*exp (-100.*(x*x + y*y)))
H = 1
}
Init {} {
P = pwave(cx, cy, 0)
U = uwave(x, y)
V = vwave(x, y)
H = 1
}
Init {} {
P = pwave(cx, cy, 0)
U = uwave(x, y)
V = vwave(x, y)
H = 1
}
Init {} { P = 1e-2*x }

