diff --git a/2d/sediment/bed_sediment/redist_n.py b/2d/sediment/bed_sediment/redist_n.py index cf8c2c4c..611ff320 100644 --- a/2d/sediment/bed_sediment/redist_n.py +++ b/2d/sediment/bed_sediment/redist_n.py @@ -6,7 +6,7 @@ LinearSolvers, LinearAlgebraTools, NumericalFlux) -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS import redist_p as physics from proteus import Context @@ -37,8 +37,8 @@ massLumping = False numericalFluxType = NumericalFlux.DoNothing conservativeFlux = None -subgridError = RDLS3P.SubgridError(physics.coefficients,nd) -shockCapturing = RDLS3P.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) +subgridError = RDLS.SubgridError(physics.coefficients,nd) +shockCapturing = RDLS.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) fullNewtonFlag = True multilevelNonlinearSolver = NonlinearSolvers.Newton diff --git a/2d/sediment/bed_sediment/redist_p.py b/2d/sediment/bed_sediment/redist_p.py index fe38f464..6a485cbb 100644 --- a/2d/sediment/bed_sediment/redist_p.py +++ b/2d/sediment/bed_sediment/redist_p.py @@ -2,7 +2,7 @@ from proteus import * from proteus.default_p import * from math import * -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS from proteus import Context """ @@ -19,11 +19,11 @@ movingDomain = ct.movingDomain T = ct.T -LevelModelType = RDLS3P.LevelModel +LevelModelType = RDLS.LevelModel -coefficients = RDLS3P.Coefficients(applyRedistancing=ct.applyRedistancing, +coefficients = RDLS.Coefficients(applyRedistancing=ct.applyRedistancing, epsFact=ct.epsFact_redistance, nModelId=ct.LS_model, rdModelId=ct.RD_model, @@ -34,7 +34,7 @@ def getDBC_rd(x,flag): pass dirichletConditions = {0:getDBC_rd} -weakDirichletConditions = {0:RDLS3P.setZeroLSweakDirichletBCsSimple} +weakDirichletConditions = {0:RDLS.setZeroLSweakDirichletBCsSimple} advectiveFluxBoundaryConditions = {} diffusiveFluxBoundaryConditions = {0:{}} diff --git a/2d/sediment/bed_sediment/tank.py b/2d/sediment/bed_sediment/tank.py index c048159d..21427050 100644 --- a/2d/sediment/bed_sediment/tank.py +++ b/2d/sediment/bed_sediment/tank.py @@ -22,12 +22,12 @@ #fluid parameters ("rho_0", 998.2, "water density"), ("rho_1", 1.205, "air density"), - ("nu_0", 1e-6, "water kin viscosity"), + ("nu_0", 1.0e-6, "water kin viscosity"), ("nu_1", 1.5e-5, "air kin viscosity"), ('g',np.array([0.0, -9.8, 0.0]),'Gravitational acceleration'), # sediment parameters ('cSed', 0.55,'Initial sediment concentration'), - ('rho_s',2600 ,'sediment material density'), + ('rho_s',2600.,'sediment material density'), ('alphaSed', 150.,'laminar drag coefficient'), ('betaSed', 1.72,'turbulent drag coefficient'), ('grain',0.0025, 'Grain size'), @@ -44,12 +44,12 @@ ('nContact', 5.0,'Contact stress coefficient'), ('angFriction', pi/6., 'Angle of friction'), ('vos_limiter', 0.6, 'Weak limiter for vos'), - ('mu_fr_limiter', 1e-3,'Hard limiter for contact stress friction coeff'), + ('mu_fr_limiter', 1.0e-3,'Hard limiter for contact stress friction coeff'), # numerical options ("refinement", 25.,"L[0]/refinement"), ("sedimentDynamics", True, "Enable sediment dynamics module"), ("cfl", 0.25 ,"Target cfl"), - ("duration", 5.0 ,"Duration of the simulation"), + ("duration", 0.5 ,"Duration of the simulation"), ("PSTAB", 1.0, "Affects subgrid error"), ("res", 1.0e-8, "Residual tolerance"), ("epsFact_density", 3.0, "Control width of water/air transition zone"), @@ -90,23 +90,23 @@ # ----- Sediment stress ----- # -sedClosure = HsuSedStress(aDarcy = opts.alphaSed, - betaForch = opts.betaSed, - grain = opts.grain, - packFraction = opts.packFraction, - packMargin = opts.packMargin, - maxFraction = opts.maxFraction, - frFraction = opts.frFraction, - sigmaC = opts.sigmaC, - C3e = opts.C3e, - C4e = opts.C4e, - eR = opts.eR, - fContact = opts.fContact, - mContact = opts.mContact, - nContact = opts.nContact, - angFriction = opts.angFriction, - vos_limiter = opts.vos_limiter, - mu_fr_limiter = opts.mu_fr_limiter, +sedClosure = HsuSedStress(opts.alphaSed, + opts.betaSed, + opts.grain, + opts.packFraction, + opts.packMargin, + opts.maxFraction, + opts.frFraction, + opts.sigmaC, + opts.C3e, + opts.C4e, + opts.eR, + opts.fContact, + opts.mContact, + opts.nContact, + opts.angFriction, + opts.vos_limiter, + opts.mu_fr_limiter, ) # ----- DOMAIN ----- # @@ -114,7 +114,7 @@ domain = Domain.PlanarStraightLineGraphDomain() -# ----- Phisical constants ----- # +# ----- Physical constants ----- # # Water rho_0 = opts.rho_0 @@ -143,10 +143,9 @@ sediment_bottom = opts.sediment_bottom waterLevel = waterLine_z -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################## # Domain and mesh -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### - +################################################################################## L = (opts.Lx, opts.Ly) he = L[0]/opts.refinement dim = dimx, dimy = L @@ -167,18 +166,18 @@ tank = st.Rectangle(domain, dim=dim, coords=coords) -############################################################################################################################################################################################################################################################################################################################################################################################# +################################################################################# # ----- BOUNDARY CONDITIONS ----- # -############################################################################################################################################################################################################################################################################################################################################################################################# +################################################################################# tank.BC['y-'].setFreeSlip() tank.BC['y+'].setAtmosphere(orientation=np.array([0., +1.,0.])) tank.BC['x-'].setFreeSlip() tank.BC['x+'].setFreeSlip() -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################# # Turbulence -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################# if opts.useRANS: @@ -190,9 +189,9 @@ tank.BC['y+'].setTurbulentZeroGradient() -###################################################################################################################################################################################################################### +################################################################################# # Gauges and probes # -###################################################################################################################################################################################################################### +################################################################################# T=opts.duration PG = [] @@ -217,9 +216,9 @@ sampleRate=0., fileName='solidFractionGauges.csv') -###################################################################################################################################################################################################################### +################################################################################## # Numerical Options and other parameters # -###################################################################################################################################################################################################################### +################################################################################## domain.MeshOptions.he = he @@ -327,9 +326,9 @@ pbasis = C0_AffineQuadraticOnSimplexWithNodalBasis -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +#################################################################################################################### # Numerical parameters -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +###################################################################################### ns_forceStrongDirichlet = False ns_sed_forceStrongDirichlet = False diff --git a/2d/sediment/friction_angle_dambrek_sediment/redist_n.py b/2d/sediment/friction_angle_dambrek_sediment/redist_n.py index cf8c2c4c..611ff320 100644 --- a/2d/sediment/friction_angle_dambrek_sediment/redist_n.py +++ b/2d/sediment/friction_angle_dambrek_sediment/redist_n.py @@ -6,7 +6,7 @@ LinearSolvers, LinearAlgebraTools, NumericalFlux) -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS import redist_p as physics from proteus import Context @@ -37,8 +37,8 @@ massLumping = False numericalFluxType = NumericalFlux.DoNothing conservativeFlux = None -subgridError = RDLS3P.SubgridError(physics.coefficients,nd) -shockCapturing = RDLS3P.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) +subgridError = RDLS.SubgridError(physics.coefficients,nd) +shockCapturing = RDLS.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) fullNewtonFlag = True multilevelNonlinearSolver = NonlinearSolvers.Newton diff --git a/2d/sediment/friction_angle_dambrek_sediment/redist_p.py b/2d/sediment/friction_angle_dambrek_sediment/redist_p.py index f6ba610b..2f371dcb 100644 --- a/2d/sediment/friction_angle_dambrek_sediment/redist_p.py +++ b/2d/sediment/friction_angle_dambrek_sediment/redist_p.py @@ -2,7 +2,7 @@ from proteus import * from proteus.default_p import * from math import * -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS from proteus import Context """ @@ -19,7 +19,7 @@ movingDomain = ct.movingDomain T = ct.T -LevelModelType = RDLS3P.LevelModel +LevelModelType = RDLS.LevelModel if ct.sedimentDynamics: LS_model=2 @@ -29,7 +29,7 @@ RD_model=2 -coefficients = RDLS3P.Coefficients(applyRedistancing=ct.applyRedistancing, +coefficients = RDLS.Coefficients(applyRedistancing=ct.applyRedistancing, epsFact=ct.epsFact_redistance, nModelId=LS_model, rdModelId=RD_model, @@ -40,7 +40,7 @@ def getDBC_rd(x,flag): pass dirichletConditions = {0:getDBC_rd} -weakDirichletConditions = {0:RDLS3P.setZeroLSweakDirichletBCsSimple} +weakDirichletConditions = {0:RDLS.setZeroLSweakDirichletBCsSimple} advectiveFluxBoundaryConditions = {} diffusiveFluxBoundaryConditions = {0:{}} diff --git a/2d/sediment/friction_angle_dambrek_sediment/tank.py b/2d/sediment/friction_angle_dambrek_sediment/tank.py index 87807cda..9c0b3aa4 100644 --- a/2d/sediment/friction_angle_dambrek_sediment/tank.py +++ b/2d/sediment/friction_angle_dambrek_sediment/tank.py @@ -56,24 +56,24 @@ # ----- Sediment stress ----- # -sedClosure = HsuSedStress(aDarcy = opts.alphaSed, - betaForch = opts.betaSed, - grain = opts.grain, - packFraction = opts.packFraction, - packMargin = opts.packMargin, - maxFraction = opts.maxFraction, - frFraction = opts.frFraction, - sigmaC = opts.sigmaC, - C3e = opts.C3e, - C4e = opts.C4e, - eR = opts.eR, - fContact = opts.fContact, - mContact = opts.mContact, - nContact = opts.nContact, - angFriction = opts.angFriction, - vos_limiter = opts.vos_limiter, - mu_fr_limiter = opts.mu_fr_limiter, - ) +sedClosure = HsuSedStress(opts.alphaSed, + opts.betaSed, + opts.grain, + opts.packFraction, + opts.packMargin, + opts.maxFraction, + opts.frFraction, + opts.sigmaC, + opts.C3e, + opts.C4e, + opts.eR, + opts.fContact, + opts.mContact, + opts.nContact, + opts.angFriction, + opts.vos_limiter, + opts.mu_fr_limiter, + ) # ----- DOMAIN ----- # diff --git a/2d/sediment/group_sediment/redist_n.py b/2d/sediment/group_sediment/redist_n.py index cf8c2c4c..611ff320 100644 --- a/2d/sediment/group_sediment/redist_n.py +++ b/2d/sediment/group_sediment/redist_n.py @@ -6,7 +6,7 @@ LinearSolvers, LinearAlgebraTools, NumericalFlux) -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS import redist_p as physics from proteus import Context @@ -37,8 +37,8 @@ massLumping = False numericalFluxType = NumericalFlux.DoNothing conservativeFlux = None -subgridError = RDLS3P.SubgridError(physics.coefficients,nd) -shockCapturing = RDLS3P.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) +subgridError = RDLS.SubgridError(physics.coefficients,nd) +shockCapturing = RDLS.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) fullNewtonFlag = True multilevelNonlinearSolver = NonlinearSolvers.Newton diff --git a/2d/sediment/group_sediment/redist_p.py b/2d/sediment/group_sediment/redist_p.py index f6ba610b..2f371dcb 100644 --- a/2d/sediment/group_sediment/redist_p.py +++ b/2d/sediment/group_sediment/redist_p.py @@ -2,7 +2,7 @@ from proteus import * from proteus.default_p import * from math import * -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS from proteus import Context """ @@ -19,7 +19,7 @@ movingDomain = ct.movingDomain T = ct.T -LevelModelType = RDLS3P.LevelModel +LevelModelType = RDLS.LevelModel if ct.sedimentDynamics: LS_model=2 @@ -29,7 +29,7 @@ RD_model=2 -coefficients = RDLS3P.Coefficients(applyRedistancing=ct.applyRedistancing, +coefficients = RDLS.Coefficients(applyRedistancing=ct.applyRedistancing, epsFact=ct.epsFact_redistance, nModelId=LS_model, rdModelId=RD_model, @@ -40,7 +40,7 @@ def getDBC_rd(x,flag): pass dirichletConditions = {0:getDBC_rd} -weakDirichletConditions = {0:RDLS3P.setZeroLSweakDirichletBCsSimple} +weakDirichletConditions = {0:RDLS.setZeroLSweakDirichletBCsSimple} advectiveFluxBoundaryConditions = {} diffusiveFluxBoundaryConditions = {0:{}} diff --git a/2d/sediment/group_sediment/tank.py b/2d/sediment/group_sediment/tank.py index 404f763e..bc317372 100644 --- a/2d/sediment/group_sediment/tank.py +++ b/2d/sediment/group_sediment/tank.py @@ -24,7 +24,7 @@ ('g',np.array([0.0, -9.8, 0.0]),'Gravitational acceleration'), # sediment parameters ('cSed', 0.05,'Sediment concentration'), - ('rho_s',2600 ,'sediment material density'), + ('rho_s',2600.0,'sediment material density'), ('alphaSed', 150.,'laminar drag coefficient'), ('betaSed', 0.0,'turbulent drag coefficient'), ('grain',0.0025, 'Grain size'), @@ -47,7 +47,7 @@ ("sedimentDynamics", True, "Enable sediment dynamics module"), ("openTop", not True, "Enable open atmosphere for air phase on the top"), ("cfl", 0.90 ,"Target cfl"), - ("duration", 6.0 ,"Duration of the simulation"), + ("duration", 1.0 ,"Duration of the simulation"), ("PSTAB", 1.0, "Affects subgrid error"), ("res", 1.0e-10, "Residual tolerance"), ("epsFact_density", 3.0, "Control width of water/air transition zone"), @@ -61,23 +61,23 @@ # ----- Sediment stress ----- # -sedClosure = HsuSedStress(aDarcy = opts.alphaSed, - betaForch = opts.betaSed, - grain = opts.grain, - packFraction = opts.packFraction, - packMargin = opts.packMargin, - maxFraction = opts.maxFraction, - frFraction = opts.frFraction, - sigmaC = opts.sigmaC, - C3e = opts.C3e, - C4e = opts.C4e, - eR = opts.eR, - fContact = opts.fContact, - mContact = opts.mContact, - nContact = opts.nContact, - angFriction = opts.angFriction, - vos_limiter = opts.vos_limiter, - mu_fr_limiter = opts.mu_fr_limiter, +sedClosure = HsuSedStress(opts.alphaSed, + opts.betaSed, + opts.grain, + opts.packFraction, + opts.packMargin, + opts.maxFraction, + opts.frFraction, + opts.sigmaC, + opts.C3e, + opts.C4e, + opts.eR, + opts.fContact, + opts.mContact, + opts.nContact, + opts.angFriction, + opts.vos_limiter, + opts.mu_fr_limiter, ) # ----- DOMAIN ----- # diff --git a/2d/sediment/pipe_scour/redist_n.py b/2d/sediment/pipe_scour/redist_n.py index cf8c2c4c..611ff320 100644 --- a/2d/sediment/pipe_scour/redist_n.py +++ b/2d/sediment/pipe_scour/redist_n.py @@ -6,7 +6,7 @@ LinearSolvers, LinearAlgebraTools, NumericalFlux) -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS import redist_p as physics from proteus import Context @@ -37,8 +37,8 @@ massLumping = False numericalFluxType = NumericalFlux.DoNothing conservativeFlux = None -subgridError = RDLS3P.SubgridError(physics.coefficients,nd) -shockCapturing = RDLS3P.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) +subgridError = RDLS.SubgridError(physics.coefficients,nd) +shockCapturing = RDLS.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) fullNewtonFlag = True multilevelNonlinearSolver = NonlinearSolvers.Newton diff --git a/2d/sediment/pipe_scour/redist_p.py b/2d/sediment/pipe_scour/redist_p.py index f6ba610b..2f371dcb 100644 --- a/2d/sediment/pipe_scour/redist_p.py +++ b/2d/sediment/pipe_scour/redist_p.py @@ -2,7 +2,7 @@ from proteus import * from proteus.default_p import * from math import * -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS from proteus import Context """ @@ -19,7 +19,7 @@ movingDomain = ct.movingDomain T = ct.T -LevelModelType = RDLS3P.LevelModel +LevelModelType = RDLS.LevelModel if ct.sedimentDynamics: LS_model=2 @@ -29,7 +29,7 @@ RD_model=2 -coefficients = RDLS3P.Coefficients(applyRedistancing=ct.applyRedistancing, +coefficients = RDLS.Coefficients(applyRedistancing=ct.applyRedistancing, epsFact=ct.epsFact_redistance, nModelId=LS_model, rdModelId=RD_model, @@ -40,7 +40,7 @@ def getDBC_rd(x,flag): pass dirichletConditions = {0:getDBC_rd} -weakDirichletConditions = {0:RDLS3P.setZeroLSweakDirichletBCsSimple} +weakDirichletConditions = {0:RDLS.setZeroLSweakDirichletBCsSimple} advectiveFluxBoundaryConditions = {} diffusiveFluxBoundaryConditions = {0:{}} diff --git a/2d/sediment/pipe_scour/tank.py b/2d/sediment/pipe_scour/tank.py index e74e6e16..3b7fa368 100644 --- a/2d/sediment/pipe_scour/tank.py +++ b/2d/sediment/pipe_scour/tank.py @@ -124,23 +124,23 @@ dissipationP = (Ut**3)/(opts.K*Y_) # ----- Sediment stress ----- # -sedClosure = HsuSedStress(aDarcy = opts.alphaSed, - betaForch = opts.betaSed, - grain = opts.grain, - packFraction = opts.packFraction, - packMargin = opts.packMargin, - maxFraction = opts.maxFraction, - frFraction = opts.frFraction, - sigmaC = opts.sigmaC, - C3e = opts.C3e, - C4e = opts.C4e, - eR = opts.eR, - fContact = opts.fContact, - mContact = opts.mContact, - nContact = opts.nContact, - angFriction = opts.angFriction, - vos_limiter = opts.vos_limiter, - mu_fr_limiter = opts.mu_fr_limiter, +sedClosure = HsuSedStress(opts.alphaSed, + opts.betaSed, + opts.grain, + opts.packFraction, + opts.packMargin, + opts.maxFraction, + opts.frFraction, + opts.sigmaC, + opts.C3e, + opts.C4e, + opts.eR, + opts.fContact, + opts.mContact, + opts.nContact, + opts.angFriction, + opts.vos_limiter, + opts.mu_fr_limiter, ) # ----- DOMAIN ----- # @@ -161,7 +161,7 @@ # Sediment rho_s = opts.rho_s -nu_s = 1000000 +nu_s = 1000000. dragAlpha = 0.0 # Surface tension @@ -580,10 +580,9 @@ ns_closure == 4 -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +##################################################################### # Functions for model variables - Initial conditions -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### - +##################################################################### def signedDistance(x): phi_z = x[1] - waterLine_z return phi_z diff --git a/2d/sediment/sediment_erosion/redist_n.py b/2d/sediment/sediment_erosion/redist_n.py index cf8c2c4c..611ff320 100644 --- a/2d/sediment/sediment_erosion/redist_n.py +++ b/2d/sediment/sediment_erosion/redist_n.py @@ -6,7 +6,7 @@ LinearSolvers, LinearAlgebraTools, NumericalFlux) -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS import redist_p as physics from proteus import Context @@ -37,8 +37,8 @@ massLumping = False numericalFluxType = NumericalFlux.DoNothing conservativeFlux = None -subgridError = RDLS3P.SubgridError(physics.coefficients,nd) -shockCapturing = RDLS3P.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) +subgridError = RDLS.SubgridError(physics.coefficients,nd) +shockCapturing = RDLS.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) fullNewtonFlag = True multilevelNonlinearSolver = NonlinearSolvers.Newton diff --git a/2d/sediment/sediment_erosion/redist_p.py b/2d/sediment/sediment_erosion/redist_p.py index fe38f464..6a485cbb 100644 --- a/2d/sediment/sediment_erosion/redist_p.py +++ b/2d/sediment/sediment_erosion/redist_p.py @@ -2,7 +2,7 @@ from proteus import * from proteus.default_p import * from math import * -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS from proteus import Context """ @@ -19,11 +19,11 @@ movingDomain = ct.movingDomain T = ct.T -LevelModelType = RDLS3P.LevelModel +LevelModelType = RDLS.LevelModel -coefficients = RDLS3P.Coefficients(applyRedistancing=ct.applyRedistancing, +coefficients = RDLS.Coefficients(applyRedistancing=ct.applyRedistancing, epsFact=ct.epsFact_redistance, nModelId=ct.LS_model, rdModelId=ct.RD_model, @@ -34,7 +34,7 @@ def getDBC_rd(x,flag): pass dirichletConditions = {0:getDBC_rd} -weakDirichletConditions = {0:RDLS3P.setZeroLSweakDirichletBCsSimple} +weakDirichletConditions = {0:RDLS.setZeroLSweakDirichletBCsSimple} advectiveFluxBoundaryConditions = {} diffusiveFluxBoundaryConditions = {0:{}} diff --git a/2d/sediment/sediment_erosion/tank.py b/2d/sediment/sediment_erosion/tank.py index a6f315ae..df8bb969 100644 --- a/2d/sediment/sediment_erosion/tank.py +++ b/2d/sediment/sediment_erosion/tank.py @@ -13,7 +13,7 @@ opts=Context.Options([ # Geometry and sed parameters ("waterLine_x", 20., "Width of free surface from left to right"), - ("waterLine_z", .5, "Heigth of free surface above bottom"), + ("waterLine_z", 0.5, "Heigth of free surface above bottom"), ("sediment_level", 0.24, "Height of the sediment column"), ("sediment_bottom", -20., "Height of the sediment column"), ("Lx", 12., "Length of the numerical domain"), @@ -22,17 +22,17 @@ ("dtout", 0.05, "Time interval for output"), #Current ("inflow_vel", 0.1, "Inflow velocity (at x direction)"), - ("ramp",1.,"Ramping time"), + ("ramp",1.0,"Ramping time"), ("I",0.03,"Turbulence intensity"), #fluid parameters ("rho_0", 998.2, "water density"), ("rho_1", 998.2, "air density"), - ("nu_0", 1e-6, "water kin viscosity"), - ("nu_1", 1e-6, "air kin viscosity"), + ("nu_0", 1.0e-6, "water kin viscosity"), + ("nu_1", 1.0e-6, "air kin viscosity"), ('g',np.array([0.0, -9.8, 0.0]),'Gravitational acceleration'), # sediment parameters ('cSed', 0.6,'Initial sediment concentration'), - ('rho_s',2600 ,'sediment material density'), + ('rho_s',2600.0,'sediment material density'), ('alphaSed', 150.,'laminar drag coefficient'), ('betaSed', 1.72,'turbulent drag coefficient'), ('grain',0.0025, 'Grain size'), @@ -60,7 +60,8 @@ ("kres", 1.0e-2, "Residual tolerance for k-epsilon"), ("epsFact_density", 3.0, "Control width of water/air transition zone"), ("epsFact_consrv_diffusion", 1.0, "Affects smoothing diffusion in mass conservation"), - ("useRANS", 1, "Switch ON turbulence models: 0-None, 1-K-Epsilon, 2-K-Omega1998, 3-K-Omega1988"), + #("useRANS", 1, "Switch ON turbulence models: 0-None, 1-K-Epsilon, 2-K-Omega1998, 3-K-Omega1988"), + ("useRANS", 0, "Switch ON turbulence models: 0-None, 1-K-Epsilon, 2-K-Omega1998, 3-K-Omega1988"), ("vos_SC",0.9,"vos shock capturing"), # ns_closure: 1-classic smagorinsky, 2-dynamic smagorinsky, 3-k-epsilon, 4-k-omega ("sigma_k", 1.0, "sigma_k coefficient for the turbulence model"), @@ -102,7 +103,7 @@ steady_current = wt.SteadyCurrent(U=np.array([opts.inflow_vel,0.,0.]),mwl=1e6,rampTime=opts.ramp) I = opts.I -kInflow = 0.5*(opts.inflow_vel*I)**2 +kInflow = 0.5*(opts.inflow_vel*I)**(2.) Lturb = opts.Ly/6. dissipationInflow = (opts.Cmu**0.75) *(kInflow**1.5)/Lturb @@ -114,27 +115,27 @@ cf = 0.045*(Re**(-1./4.)) Ut = opts.inflow_vel*sqrt(cf/2.) Yplus = Y_*Ut/opts.nu_0 -kappaP = (Ut**2)/sqrt(opts.Cmu) -dissipationP = (Ut**3)/(opts.K*Y_) +kappaP = (Ut**(2.))/sqrt(opts.Cmu) +dissipationP = (Ut**(3.))/(opts.K*Y_) # ----- Sediment stress ----- # -sedClosure = HsuSedStress(aDarcy = opts.alphaSed, - betaForch = opts.betaSed, - grain = opts.grain, - packFraction = opts.packFraction, - packMargin = opts.packMargin, - maxFraction = opts.maxFraction, - frFraction = opts.frFraction, - sigmaC = opts.sigmaC, - C3e = opts.C3e, - C4e = opts.C4e, - eR = opts.eR, - fContact = opts.fContact, - mContact = opts.mContact, - nContact = opts.nContact, - angFriction = opts.angFriction, - vos_limiter = opts.vos_limiter, - mu_fr_limiter = opts.mu_fr_limiter, +sedClosure = HsuSedStress(opts.alphaSed, + opts.betaSed, + opts.grain, + opts.packFraction, + opts.packMargin, + opts.maxFraction, + opts.frFraction, + opts.sigmaC, + opts.C3e, + opts.C4e, + opts.eR, + opts.fContact, + opts.mContact, + opts.nContact, + opts.angFriction, + opts.vos_limiter, + opts.mu_fr_limiter, ) # ----- DOMAIN ----- # @@ -155,7 +156,7 @@ # Sediment rho_s = opts.rho_s -nu_s = 1000000 +nu_s = 1000000.0 dragAlpha = 0.0 # Surface tension @@ -172,9 +173,9 @@ sediment_bottom = opts.sediment_bottom waterLevel = waterLine_z -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +####################################################################### # Domain and mesh -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +####################################################################### #L = (opts.Lx, opts.Ly) #he = L[0]/opts.refinement @@ -184,8 +185,6 @@ ############ TANK ################### - - tank_dim = (opts.Lx, opts.Ly) xHoleCenter = opts.Lx/2. @@ -196,9 +195,6 @@ x2 = opts.Lx - xHoleCenter / 8. dHole = opts.Ly/4. - - - ### CYLINDER ##### #cylinder_pos = np.array([opts.cylinder_pos_x, opts.cylinder_pos_y, 0.]) #cylinder_radius = opts.cylinder_radius @@ -222,7 +218,7 @@ boundaryOrientations = {'y-': np.array([0., -1.,0.]), - 'x+': np.array([+1, 0.,0.]), + 'x+': np.array([+1., 0.,0.]), 'y+': np.array([0., +1.,0.]), 'x-': np.array([-1., 0.,0.]), 'sponge': None, @@ -310,15 +306,25 @@ regions=regions, regionFlags=regionFlags, boundaryTags=boundaryTags, boundaryOrientations=boundaryOrientations) -kWallWall = bc.kWall(Y=Y_, Yplus=Yplus, b_or=boundaryOrientations['y-'], nu=nu_0) +kWallWall = bc.kWall(Y_, Yplus, boundaryOrientations['y-'], nu_0) kWalls = [kWallWall] -wallWall = bc.WallFunctions(turbModel='ke', kWall=kWallWall, b_or=boundaryOrientations['y-'], Y=Y_, Yplus=Yplus, U0=[opts.inflow_vel, 0. , 0.], nu=nu_0, Cmu=opts.Cmu, K=opts.K, B=opts.B) +wallWall = bc.WallFunctions('ke', + kWallWall, +# boundaryOrientations['y-'], + Y_, + Yplus, + [opts.inflow_vel, 0. , 0.], + nu_0, + opts.Cmu, + opts.K, + opts.B) walls = [wallWall] -############################################################################################################################################################################################################################################################################################################################################################################################# +################################################################################# # ----- BOUNDARY CONDITIONS ----- # -############################################################################################################################################################################################################################################################################################################################################################################################# +################################################################################# + tank.setTurbulentWall(walls) tank.setTurbulentKWall(kWalls) #tank.BC['y-'].setFreeSlip() @@ -338,14 +344,9 @@ kInflowAir=kInflow, dissipationInflowAir=dissipationInflow) #tank.BC['x+'].setFreeSlip() - - - - - -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################## # Turbulence -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################## tank.BC['hole_x+'].setNoSlip() @@ -353,9 +354,9 @@ tank.BC['hole_y-'].setNoSlip() -###################################################################################################################################################################################################################### +################################################################################### # Gauges and probes # -###################################################################################################################################################################################################################### +################################################################################### T=opts.duration PG = [] @@ -381,9 +382,9 @@ fileName='solidFractionGauges.csv') -###################################################################################################################################################################################################################### +################################################################################## # Numerical Options and other parameters # -###################################################################################################################################################################################################################### +################################################################################## domain.MeshOptions.he = he @@ -490,10 +491,9 @@ else: pbasis = C0_AffineQuadraticOnSimplexWithNodalBasis - -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################### # Numerical parameters -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################### ns_forceStrongDirichlet = False ns_sed_forceStrongDirichlet = False @@ -584,9 +584,9 @@ pressure_nl_atol_res = max(opts.res, 0.001 * he ** 2) -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################### # Turbulence -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################### ns_closure = 0 #1-classic smagorinsky, 2-dynamic smagorinsky, 3 -- k-epsilon, 4 -- k-omega ns_sed_closure = 0 #1-classic smagorinsky, 2-dynamic smagorinsky, 3 -- k-epsilon, 4 -- k-omega @@ -596,9 +596,9 @@ ns_closure == 4 -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################### # Functions for model variables - Initial conditions -#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### +################################################################################### def signedDistance(x): phi_z = x[1] - waterLine_z diff --git a/2d/sediment/strip_sediment/redist_n.py b/2d/sediment/strip_sediment/redist_n.py index cf8c2c4c..611ff320 100644 --- a/2d/sediment/strip_sediment/redist_n.py +++ b/2d/sediment/strip_sediment/redist_n.py @@ -6,7 +6,7 @@ LinearSolvers, LinearAlgebraTools, NumericalFlux) -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS import redist_p as physics from proteus import Context @@ -37,8 +37,8 @@ massLumping = False numericalFluxType = NumericalFlux.DoNothing conservativeFlux = None -subgridError = RDLS3P.SubgridError(physics.coefficients,nd) -shockCapturing = RDLS3P.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) +subgridError = RDLS.SubgridError(physics.coefficients,nd) +shockCapturing = RDLS.ShockCapturing(physics.coefficients,nd,shockCapturingFactor=ct.rd_shockCapturingFactor,lag=ct.rd_lag_shockCapturing) fullNewtonFlag = True multilevelNonlinearSolver = NonlinearSolvers.Newton diff --git a/2d/sediment/strip_sediment/redist_p.py b/2d/sediment/strip_sediment/redist_p.py index fe38f464..6a485cbb 100644 --- a/2d/sediment/strip_sediment/redist_p.py +++ b/2d/sediment/strip_sediment/redist_p.py @@ -2,7 +2,7 @@ from proteus import * from proteus.default_p import * from math import * -from proteus.mprans import RDLS3P +from proteus.mprans import RDLS from proteus import Context """ @@ -19,11 +19,11 @@ movingDomain = ct.movingDomain T = ct.T -LevelModelType = RDLS3P.LevelModel +LevelModelType = RDLS.LevelModel -coefficients = RDLS3P.Coefficients(applyRedistancing=ct.applyRedistancing, +coefficients = RDLS.Coefficients(applyRedistancing=ct.applyRedistancing, epsFact=ct.epsFact_redistance, nModelId=ct.LS_model, rdModelId=ct.RD_model, @@ -34,7 +34,7 @@ def getDBC_rd(x,flag): pass dirichletConditions = {0:getDBC_rd} -weakDirichletConditions = {0:RDLS3P.setZeroLSweakDirichletBCsSimple} +weakDirichletConditions = {0:RDLS.setZeroLSweakDirichletBCsSimple} advectiveFluxBoundaryConditions = {} diffusiveFluxBoundaryConditions = {0:{}} diff --git a/2d/sediment/strip_sediment/tank.py b/2d/sediment/strip_sediment/tank.py index ffe26813..9cf742d9 100644 --- a/2d/sediment/strip_sediment/tank.py +++ b/2d/sediment/strip_sediment/tank.py @@ -27,7 +27,7 @@ ('g',np.array([0.0, -9.8, 0.0]),'Gravitational acceleration'), # sediment parameters ('cSed', 0.55,'Initial sediment concentration'), - ('rho_s',2600 ,'sediment material density'), + ('rho_s',2600.0,'sediment material density'), ('alphaSed', 150.,'laminar drag coefficient'), ('betaSed', 1.72,'turbulent drag coefficient'), ('grain',0.0025, 'Grain size'), @@ -49,7 +49,7 @@ ("refinement", 25.,"L[0]/refinement"), ("sedimentDynamics", True, "Enable sediment dynamics module"), ("cfl", 0.25 ,"Target cfl"), - ("duration", 10.0 ,"Duration of the simulation"), + ("duration", 0.5 ,"Duration of the simulation"), ("PSTAB", 1.0, "Affects subgrid error"), ("res", 1.0e-8, "Residual tolerance"), ("epsFact_density", 3.0, "Control width of water/air transition zone"), @@ -89,23 +89,23 @@ # ----- Sediment stress ----- # -sedClosure = HsuSedStress(aDarcy = opts.alphaSed, - betaForch = opts.betaSed, - grain = opts.grain, - packFraction = opts.packFraction, - packMargin = opts.packMargin, - maxFraction = opts.maxFraction, - frFraction = opts.frFraction, - sigmaC = opts.sigmaC, - C3e = opts.C3e, - C4e = opts.C4e, - eR = opts.eR, - fContact = opts.fContact, - mContact = opts.mContact, - nContact = opts.nContact, - angFriction = opts.angFriction, - vos_limiter = opts.vos_limiter, - mu_fr_limiter = opts.mu_fr_limiter, +sedClosure = HsuSedStress(opts.alphaSed, + opts.betaSed, + opts.grain, + opts.packFraction, + opts.packMargin, + opts.maxFraction, + opts.frFraction, + opts.sigmaC, + opts.C3e, + opts.C4e, + opts.eR, + opts.fContact, + opts.mContact, + opts.nContact, + opts.angFriction, + opts.vos_limiter, + opts.mu_fr_limiter, ) # ----- DOMAIN ----- # @@ -126,7 +126,7 @@ # Sediment rho_s = opts.rho_s -nu_s = 1000000 +nu_s = 1000000.0 dragAlpha = 0.0 # Surface tension diff --git a/README.rst b/README.rst index b9dde03b..8c0421ac 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ Verification and validation for air/water flow models ===================================================== -https://github.com/erdc-cm/air-water-vv +https://github.com/erdc/air-water-vv Organization of the test set ---------------------------- @@ -16,7 +16,7 @@ test consists of a single directory including - All data files describing the geometry and physical parameters of the problem - A set of input files for a code - (e.g. https://github.com/erdc-cm/proteus) + (e.g. https://github.com/erdc/proteus) - A script for results postprocessing (Optional) - A script for running regression tests diff --git a/private/proteus-mprans.yaml b/private/proteus-mprans.yaml index 8e1a4d58..f7cea748 100644 --- a/private/proteus-mprans.yaml +++ b/private/proteus-mprans.yaml @@ -4,7 +4,7 @@ dependencies: run: [proteus, numpy] sources: - - url: https://github.com/erdc-cm/proteus-mprans + - url: https://github.com/erdc/proteus-mprans key: git:fc5a90c2a50bb9716460876ad1ee91da598ff8f3 profile_links: