Skip to content

Commit

Permalink
add periodic hill setup
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobBD committed Dec 9, 2021
1 parent f965c9b commit 0bf120f
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 1 deletion.
120 changes: 120 additions & 0 deletions ini/phill/parameter_flexi.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
!===============================================================================
! Parameters for the Ercoftac periodic hill testcase
! http://www.kbwiki.ercoftac.org/w/index.php/Abstr:2D_Periodic_Hill_Flow
!===============================================================================
!============================================================================================================================
! Interpolation
!============================================================================================================================
N = 5 ! Polynomial degree of computation to represent to solution
!============================================================================================================================
! Restart
!============================================================================================================================
ResetTime = F ! Override solution time to t=0 on restart.
!============================================================================================================================
! Output
!============================================================================================================================
ProjectName = phillRe700Ma0.2NoModel ! Name of the current simulation (mandatory).
Logging = F ! Write log files containing debug output.
ErrorFiles = T ! Write error files containing error output.
OutputFormat = None ! File format for visualization: None, Tecplot, TecplotASCII, ParaView. Note:
! Tecplot output is currently unavailable due to licensing issues.
ASCIIOutputFormat = CSV ! File format for ASCII files, e.g. body forces: CSV, Tecplot.
doPrintStatusLine = T ! Print: percentage of time, ...
WriteStateFiles = T ! Write HDF5 state files. Disable this only for debugging issues.
! NO SOLUTION WILL BE WRITTEN!
!============================================================================================================================
! Mesh
!============================================================================================================================
MeshFile = phill_mesh.h5 ! (relative) path to meshfile (mandatory).
useCurveds = T ! Controls usage of high-order information in mesh. Turn off to discard high-order
! data and treat curved meshes as linear meshes.
!============================================================================================================================
! Equation of State
!============================================================================================================================
kappa = 1.4 ! Heat capacity ratio / isentropic exponent
R = 17.8571428571429 ! Specific gas constant
Pr = 0.72 ! Prandtl number
mu0 = 1.42857142E-03 ! Dynamic Viscosity
!============================================================================================================================
! Equation
!============================================================================================================================
IniRefState = 1 ! Refstate required for initialization.
RefState = (/1.,1.,0.,0.,17.8571428571429/) ! State(s) in primitive variables (density, velx, vely, velz, pressure).
!============================================================================================================================
! Riemann
!============================================================================================================================
Riemann = RoeL2 ! Riemann solver to be used: LF, HLLC, Roe, RoeEntropyFix, HLL, HLLE, HLLEM
RiemannBC = Same ! Riemann solver used for boundary conditions: Same, LF, Roe, RoeEntropyFix, HLL,
! HLLE, HLLEM
!============================================================================================================================
! SplitDG
!============================================================================================================================
SplitDG = PI ! SplitDG formulation to be used: SD, MO, DU, KG, PI, CH
!============================================================================================================================
! Exactfunc
!============================================================================================================================
IniExactFunc = 0 ! Exact function to be used for computing initial solution.
!============================================================================================================================
! Testcase
!============================================================================================================================
massFlowRef = 9.1125 ! Prescribed massflow for testcase.
Forcing_MaxMemory = 100.0 ! Maximum amount of memory to be used to buffer testcase forcing log data. If
! memory is exceeded before analyze level, log files are written.
massFlowBCName = BC_periodicx- ! Name of BC at which massflow is computed.
!============================================================================================================================
! Lifting
!============================================================================================================================
doWeakLifting = F ! Set true to perform lifting in weak form.
doConservativeLifting = F ! Set true to compute the volume contribution to the gradients in conservative
! form, i.e. deriving the solution multiplied by the metric terms instead of
! deriving the solution and multiplying by the metrics. Only available for
! doWeakLifting=.FALSE.
!============================================================================================================================
! TimeDisc
!============================================================================================================================
TimeDiscMethod = CarpenterRK4-5 ! Specifies the type of time-discretization to be used, e.g. the name of a
! specific Runge-Kutta scheme. Possible values:
! * standardrk3-3
! * carpenterrk4-5
! * niegemannrk4-14
! * toulorgerk4-8c
! * toulorgerk3-7c
! * toulorgerk4-8f
! * ketchesonrk4-20
! * ketchesonrk4-18
TEnd = 240. ! End time of the simulation (mandatory).
CFLScale = 0.8 ! Scaling factor for the theoretical CFL number, typical range 0.1..1.0
! (mandatory)
DFLScale = 0.8 ! Scaling factor for the theoretical DFL number, typical range 0.1..1.0
! (mandatory)
!============================================================================================================================
! Analyze
!============================================================================================================================
CalcErrorNorms = F ! Set true to compute L2 and LInf error norms at analyze step.
AnalyzeToFile = F ! Set true to output result of error norms to a file (CalcErrorNorms=T)
Analyze_dt = 20.0 ! Specifies time intervall at which analysis routines are called.
nWriteData = 1 ! Intervall as multiple of Analyze_dt at which HDF5 files (e.g.
! State,TimeAvg,Fluc) are written.
!============================================================================================================================
! AnalyzeEquation
!============================================================================================================================
CalcBodyForces = F ! Set true to compute body forces at walls
CalcBulkState = F ! Set true to compute the flows bulk quantities
CalcMeanFlux = F ! Set true to compute mean flux through boundaries
CalcWallVelocity = T ! Set true to compute velocities at wall boundaries
CalcTotalStates = F ! Set true to compute total states (e.g. Tt,pt)
CalcTimeAverage = T ! Set true to compute time averages
WriteBodyForces = T ! Set true to write bodyforces to file
WriteBulkState = T ! Set true to write bulk state to file
WriteMeanFlux = T ! Set true to write mean flux to file
WriteWallVelocity = T ! Set true to write wall velolcities file
WriteTotalStates = T ! Set true to write total states to file
VarNameAvg = Density ! Names of variables to be time-averaged
VarNameAvg = VelocityX ! Names of variables to be time-averaged
VarNameAvg = VelocityY ! Names of variables to be time-averaged
VarNameAvg = VelocityZ ! Names of variables to be time-averaged
VarNameAvg = Pressure ! Names of variables to be time-averaged
VarNameFluc = VelocityX ! Names of variables to be time-averaged
VarNameFluc = VelocityY ! Names of variables to be time-averaged
VarNameFluc = VelocityZ ! Names of variables to be time-averaged
VarNameFluc = uv ! Names of variables to be time-averaged
62 changes: 62 additions & 0 deletions ini/phill/parameter_hopr.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

! Parameters for the Ercoftac periodic hill testcase
! http://www.kbwiki.ercoftac.org/w/index.php/Abstr:2D_Periodic_Hill_Flow
! For Re=700, a resolution of 16x16x8 elems with bell stretching and DXmaxToDXmin = (/1.5,10.,1./)
! yields approximately y+=0.8 and x+=z+=12 at the hill cusp and about half of that everywhere else.

!=============================================================================== !
! OUTPUT
!=============================================================================== !
ProjectName = phill ! name of the project (used for filenames)
Debugvisu = F ! Write debug mesh to tecplot file

DebugvisuLevel = 1 ! Level 0: visualization of linear mesh and BC
! (default), Level 1: + curved surface
! visualization (_SplineSurf.dat), if useCurveds
NVisu = 4 ! number of visualization points per element edge,
! if useCurved

checkElemJacobians = T ! checks the Jacobian and scaled Jacobian for each element
!=============================================================================== !
! MESH
!=============================================================================== !
Mode = 11 ! 11 Curved structured block, only hexahedra
nZones = 1 ! number of zones (only one possible!)
nElems = (/16,16,8/) ! number of elements in each direction
BCIndex = (/1,2,3,4,5,6/) ! Indices of UserDefinedBoundaries

Meshtype = 1 ! Mesh Types: 1 - Cube (origin + dimensions) 2 -
! Bilinear (8 points CGNS notation) 3 - Curved
! (see Whichmapping)

X0 = (/0.,0.,0./)
DX = (/9.,3.035,4.5/)
stretchType = (/3,3,0/)
DXmaxToDXmin = (/1.5,10.,1./)

MeshPostDeform = 5
!=============================================================================== !
! CURVED
!=============================================================================== !
useCurveds = T ! T if curved boundaries defined
BoundaryOrder = 4 ! choose order freely!
nCurvedBoundaryLayer= 1
!=============================================================================== !
! BOUNDARY CONDITIONS
!=============================================================================== !
nUserDefinedBoundaries = 6 ! number of bc's, order of bc's in cgns face order
BoundaryName=BC_periodicz-
BoundaryType=(/1,0,0,2/) ! (/bc-type,curved index,bc state,displacement vector/)
BoundaryName=BC_wall_lower
BoundaryType=(/4,0,1,0/) ! (/bc-type,curved index,bc state,displacement vector/)
BoundaryName=BC_periodicx+
BoundaryType=(/1,0,0,-1/) ! (/bc-type,curved index,bc state,displacement vector/)
BoundaryName=BC_wall_upper
BoundaryType=(/4,0,1,0/) ! (/bc-type,curved index,bc state,displacement vector/)
BoundaryName=BC_periodicx-
BoundaryType=(/1,0,0,1/) ! (/bc-type,curved index,bc state,displacement vector/)
BoundaryName=BC_periodicz+
BoundaryType=(/1,0,0,-2/) ! (/bc-type,curved index,bc state,displacement vector/)
nVV=2 ! number of displacement vectors for periodic bc's (=number bc's)
VV=(/9,0.,0./) ! displacement vector 1 for bc with (/?,?,?,+-1)
VV=(/0.,0.,4.5/) ! displacement vector 2 for bc with (/?,?,?,+-2)
3 changes: 2 additions & 1 deletion src/testcase/phill/testcase.f90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
#endif

!==================================================================================================================================
!> Subroutines defining one specific testcase with all necessary variables
!> Ercoftac periodic hill testcase
!> http://www.kbwiki.ercoftac.org/w/index.php/Abstr:2D_Periodic_Hill_Flow
!==================================================================================================================================
MODULE MOD_Testcase
! MODULES
Expand Down

0 comments on commit 0bf120f

Please sign in to comment.