Beruflich Dokumente
Kultur Dokumente
interFoam, which is a solver for 2 incompressible fluids with interface tracking, is used in the
present study.
Tutorials: http://cfd.direct/openfoam/user-guide/dambreak/
0 where boundary conditions are defined for
alpha.water, B, k, nuSgs, p_rgh, U
6 (18.2 0.6
0.3)
2 (18.2 0 0.3) How to choose an appropriate domain
width?
- Big enough to cover several largest
eddies in the experiment;
5 (18.2 0.6 0.064) - Not to big, to save computational cost.
1 (18.2 0 0.064)
Nz = 80. Nx = 2427.
How to determine the number of grids in the How to determine the number of grids in the
vertical direction? streamwise direction?
-- Determined by the number of grids needed to -- Make sure the ratio of ∆𝑥/∆𝑧 is not too big (<5).
solve the wave.
E.g., in this case, zmax=7.5 mm at the left
E.g., in this case, H0=0.22 m. Using 30 grids to boundary; zmin=3 mm at the right boundary.
solve the wave To make ∆𝑥/∆𝑧 < 5, choose xmax=11.5 mm (∆𝑥/∆𝑧
∆z = 7.5 mm at the left boundary = 3.8) at the left boundary
Nz = Domain height / ∆z = 80 and
xmin=4.6 mm (∆𝑥/∆𝑧 = 1.5) at the right boundary.
Ny = 80. ∆𝑥 is shrinking from the left to the right. (So is ∆𝑧 )
How to determine the number of grids in the
spanwise direction?
Make sure the ratios of ∆𝑦/∆𝑧 and ∆𝑥/∆𝑦 are
not too big. E.g., in this case, ∆y = 7.5 mm
Build the domain and set the grids
Offshore
(0 0 0) (0 0.6 0)
(0 0 -0.3)
Onshore (0 0.6 -0.3)
What is groovyBC?
-- A library that can be used to generate arbitrary boundary conditions based
on expressions. It is included in the swak4Foam library package.
Link: https://openfoamwiki.net/index.php/Contrib/swak4Foam
Install groovyBC
wmake all
Use groovyBC to send in solitary wave
ì H
ï 1, z £
cosh 2 ( atp ( -ct + xs))
Expression of the
ï theoretical surface
a1 = í elevation in Lee et al.
ï0, z > H
[1982]
ïî cosh 2 ( atp ( -ct + xs))
hfs
h = 0.3m H = 0.22m fs = 2.644 g = ( 0, 0,-9.81) c = gh (1+ H h) xs = atp =
0.75H
H h h3
ì é ù
ï ghH 0.25H H
ê 1- ú , z £
ï cosh 2 éëatp ( -ct + xs )ùû h êë cosh 2 éëatp ( -ct + xs)ùû h úû cosh 2 ( atp ( -ct + xs))
u=í
ï H
ï 0, z >
î cosh 2 ( atp ( -ct + xs )) Expression of the
theoretical velocity in
v=0 Lee et al. [1982]
ì é ù
ï - ghz 0.5Hdex H
ê1- ú , z £
ï h êë cosh 2 éëatp ( -ct + xs)ùû h úû cosh 2 ( atp ( -ct + xs))
w=í
ï H
ï 0, z >
î cosh 2 ( atp ( -ct + xs))
Specify the boundary conditions
of strain
U: velocity
Specify the boundary conditions
zeroGradient: normal gradient is zero
startFrom
stopAt
deltaT
writeControl
adjustTimeStep
maxCo
maxAlphaCo
maxDeltaT
Build the domain and set the grids
“decomposeParDict”
numberOfSubdomains 8;
simpleCoeffs
{
n (4 1 2);
…
}
Type
decomposePar
z
y
x
Build the domain and set the grids
Type
interFoam