It is now possible to use waveVelocity and waveAlpha boundary conditions in cases in which the waves generate localised flow reversals along the boundary. This means waves can be speficied at arbitrary directions and with zero mean flow. Previously and integral approach, similar to flowRateOutlet, was used, which was only correct when the direction of wave propagation was aligned with the boundary normal. This improvement has been achieved by reformulating the waveVelocity and waveAlpha boundary conditions in terms of a new fixedValueInletOutlet boundary condition type. This condition enforces a fixed value in all cases except that of advection terms in the presence of outflow. In this configuration a gradient condition is applied that will relax towards the desired fixed value. The wavePressure boundary condition has been removed, as it is no longer necessary or advisable to locally switch between velocity and pressure formulations along a wave boundary. Wave boundaries should now have the general fixedFluxPressure or fixedFluxExtrapolatedPressure conditions applied to the pressure field. Two new tutorial cases have been created to demonstrate the new functionality. The multiphase/interFoam/laminar/wave3D case demonstrates wave generation with zero mean flow and at arbitrary angles to the boundaries, and incompressible/pimpleFoam/RAS/waveSubSurface demonstrates usage for sub-surface problems.
28 lines
528 B
Bash
Executable File
28 lines
528 B
Bash
Executable File
#!/bin/sh
|
|
|
|
cd ${0%/*} || exit 1
|
|
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
|
|
|
runApplication blockMesh
|
|
|
|
for i in 1 2
|
|
do
|
|
runApplication -s XY$i topoSet -dict topoSetDictXY$i
|
|
runApplication -s XY$i refineMesh -dict refineMeshDictXY -overwrite
|
|
done
|
|
|
|
for i in 1 2 3 4
|
|
do
|
|
runApplication -s Z$i topoSet -dict topoSetDictZ$i
|
|
runApplication -s Z$i refineMesh -dict refineMeshDictZ -overwrite
|
|
done
|
|
|
|
runApplication setWaves
|
|
|
|
runApplication decomposePar
|
|
|
|
runParallel $(getApplication)
|
|
|
|
runApplication reconstructPar -newTimes
|