# COOLFluiD CFcase file
#
# Comments begin with "#"
# Meta Comments begin with triple "#"
#
### Residual = -1.26264

#

# SubSystem Modules
Simulator.Modules.Libs = libCFmeshFileWriter libCFmeshFileReader libTecplotWriter   libNavierStokes libFiniteVolume libNewtonMethod libFiniteVolumeNavierStokes libTHOR2CFmesh libPetscI

# SubSystem Parameters
Simulator.Paths.WorkingDir = plugins/NavierStokes/testcases/FwdStep/
Simulator.Paths.ResultsDir       = ./

Simulator.SubSystem.Default.PhysicalModelType = Euler2D
Simulator.SubSystem.Euler2D.refValues = 1. 3.54964787 3.54964787 8.8
Simulator.SubSystem.Euler2D.refLength = 1.0

Simulator.SubSystem.SubSystemStatus.TimeStep = 0.004
Simulator.SubSystem.SubSystemStatus.ComputeDT = FunctionDT
Simulator.SubSystem.SubSystemStatus.FunctionDT.Def = 0.004


Simulator.SubSystem.ConvergenceFile     = convergence.plt


Simulator.SubSystem.OutputFormat        = Tecplot CFmesh
Simulator.SubSystem.CFmesh.FileName     = step.CFmesh
Simulator.SubSystem.Tecplot.FileName    = step.plt
Simulator.SubSystem.Tecplot.Data.updateVar = Cons
Simulator.SubSystem.Tecplot.SaveRate = 10
Simulator.SubSystem.CFmesh.SaveRate = 10
Simulator.SubSystem.Tecplot.AppendTime = false
Simulator.SubSystem.CFmesh.AppendTime = false
Simulator.SubSystem.Tecplot.AppendIter = false
Simulator.SubSystem.CFmesh.AppendIter = false

Simulator.SubSystem.ConvRate            = 1
Simulator.SubSystem.ShowRate            = 1

Simulator.SubSystem.StopCondition       = MaxNumberSteps
Simulator.SubSystem.MaxNumberSteps.nbSteps = 1

#Simulator.SubSystem.StopCondition       = Norm
#Simulator.SubSystem.Norm.valueNorm      = -5.0

Simulator.SubSystem.Default.listTRS = InnerFaces SlipWall SuperInlet SuperOutlet

Simulator.SubSystem.MeshCreator = CFmeshFileReader
Simulator.SubSystem.CFmeshFileReader.Data.FileName = step.CFmesh
Simulator.SubSystem.CFmeshFileReader.THOR2CFmesh.Discontinuous = true
Simulator.SubSystem.CFmeshFileReader.THOR2CFmesh.SolutionOrder = P0
Simulator.SubSystem.CFmeshFileReader.convertFrom = THOR2CFmesh

Simulator.SubSystem.LinearSystemSolver = PETSC
Simulator.SubSystem.LSSNames = CrankNicholsonLSS
Simulator.SubSystem.CrankNicholsonLSS.Data.PCType = PCASM
Simulator.SubSystem.CrankNicholsonLSS.Data.KSPType = KSPGMRES
Simulator.SubSystem.CrankNicholsonLSS.Data.MatOrderingType = MATORDERING_RCM

Simulator.SubSystem.ConvergenceMethod = CrankNicholson
Simulator.SubSystem.CrankNicholson.Data.CFL.Value = 5.0
#Simulator.SubSystem.CrankNicholson.Data.CFL.ComputeCFL = Function
#Simulator.SubSystem.CrankNicholson.Data.CFL.Function.Def = if(i>50,min(100.,5.0*2.^(i-50)),5.0)
Simulator.SubSystem.CrankNicholson.Data.MaxSteps = 10

Simulator.SubSystem.SpaceMethod = CellCenterFVM
Simulator.SubSystem.CellCenterFVM.ComputeRHS = NumJacob
Simulator.SubSystem.CellCenterFVM.ComputeTimeRHS = PseudoSteadyTimeRhs
#Simulator.SubSystem.CellCenterFVM.PseudoSteadyTimeRhs.useGlobalDT = true

Simulator.SubSystem.CellCenterFVM.SetupCom = LeastSquareP1Setup
Simulator.SubSystem.CellCenterFVM.SetupNames = Setup1
Simulator.SubSystem.CellCenterFVM.Setup1.stencil = FaceVertex
Simulator.SubSystem.CellCenterFVM.UnSetupCom = LeastSquareP1UnSetup
Simulator.SubSystem.CellCenterFVM.UnSetupNames = UnSetup1

Simulator.SubSystem.CellCenterFVM.Data.FluxSplitter = RoeEntropyFix
Simulator.SubSystem.CellCenterFVM.Data.RoeEntropyFix.entropyFixID = 1

Simulator.SubSystem.CellCenterFVM.Data.UpdateVar  = Cons
Simulator.SubSystem.CellCenterFVM.Data.SolutionVar = Cons
Simulator.SubSystem.CellCenterFVM.Data.LinearVar   = Roe

#Simulator.SubSystem.CellCenterFVM.Data.PolyRec = Constant
Simulator.SubSystem.CellCenterFVM.Data.PolyRec = LinearLS2D
Simulator.SubSystem.CellCenterFVM.Data.LinearLS2D.limitRes = -3.0
#Simulator.SubSystem.CellCenterFVM.Data.Limiter = BarthJesp2D
Simulator.SubSystem.CellCenterFVM.Data.Limiter = Venktn2D
Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.coeffEps = 1.0

Simulator.SubSystem.CellCenterFVM.InitComds = InitState \
          MirrorEuler2DFVMCC \
          SuperInletFVMCC \
          SuperOutletFVMCC

Simulator.SubSystem.CellCenterFVM.InitNames = InField \
          InMirror \
          InInlet \
          InOutlet

Simulator.SubSystem.CellCenterFVM.InField.applyTRS = InnerFaces
Simulator.SubSystem.CellCenterFVM.InField.Vars = x y
Simulator.SubSystem.CellCenterFVM.InField.Def = 1. \
                                        3.54964787 \
                                        0.0 \
                                        8.8

Simulator.SubSystem.CellCenterFVM.InMirror.applyTRS = SlipWall

Simulator.SubSystem.CellCenterFVM.InInlet.applyTRS = SuperInlet
Simulator.SubSystem.CellCenterFVM.InInlet.Vars = x y
Simulator.SubSystem.CellCenterFVM.InInlet.Def = 1. \
                                        3.54964787 \
                                        0.0 \
                                        8.8

Simulator.SubSystem.CellCenterFVM.InOutlet.applyTRS = SuperOutlet

Simulator.SubSystem.CellCenterFVM.BcComds = MirrorEuler2DFVMCC \
          SuperInletFVMCC \
          SuperOutletFVMCC
Simulator.SubSystem.CellCenterFVM.BcNames = Wall \
        Inlet \
        Outlet

Simulator.SubSystem.CellCenterFVM.Wall.applyTRS = SlipWall

Simulator.SubSystem.CellCenterFVM.Inlet.applyTRS = SuperInlet
Simulator.SubSystem.CellCenterFVM.Inlet.Vars = x y
Simulator.SubSystem.CellCenterFVM.Inlet.Def = 1. \
                                        3.54964787 \
                                        0.0 \
                                        8.8

Simulator.SubSystem.CellCenterFVM.Outlet.applyTRS = SuperOutlet



