Beispiel #1
0
from proteus import *
from proteus.default_p import *
from jet_test2D import *
from proteus.mprans import Kappa

LevelModelType = Kappa.LevelModel

coefficients = Kappa.Coefficients(
    V_model=0,
    ME_model=3,
    LS_model=1,
    RD_model=None,
    dissipation_model=4,
    dissipation_model_flag=dissipation_model_flag,
    useMetrics=useMetrics,
    rho_0=rho_0,
    nu_0=nu_0,
    rho_1=rho_1,
    nu_1=nu_1,
    g=g,
    c_mu=0.09,
    sigma_k=1.0,
    sc_uref=kappa_sc_uref,
    sc_beta=kappa_sc_beta)


def getDBC_k(x, flag):
    if flag == boundaryTags['inflow']:
        return lambda x, t: kInflow
    if flag == boundaryTags['wall']:
        return lambda x, t: 0.0
Beispiel #2
0
    LS_model = 2
    ME_model = 5
    dissipation_model = 6
#
dissipation_model_flag = 1
if useRANS == 2:
    dissipation_model_flag = 2
coefficients = Kappa.Coefficients(
    V_model=0,
    ME_model=ME_model,
    LS_model=LS_model,
    RD_model=RD_model,
    dissipation_model=dissipation_model,
    dissipation_model_flag=dissipation_model_flag,  #1 -- K-epsilon, 2 -- K-omega
    useMetrics=useMetrics,
    rho_0=rho_0,
    nu_0=nu_0,
    rho_1=rho_1,
    nu_1=nu_1,
    g=g,
    c_mu=0.09,
    sigma_k=1.0,
    sc_uref=kappa_sc_uref,
    sc_beta=kappa_sc_beta)


def getDBC_k(x, flag):
    if flag == boundaryTags['left']:
        return lambda x, t: kInflow
    if flag == boundaryTags['right']:
        return lambda x, t: 0.0
Beispiel #3
0
dissipation_model_flag = 1
if ct.useRANS == 2:
    dissipation_model_flag = 2
elif ct.useRANS == 3:
    dissipation_model_flag = 3

coefficients = Kappa.Coefficients(
    V_model=int(ct.movingDomain) + 0,
    ME_model=ME_model,
    LS_model=LS_model,
    RD_model=RD_model,
    dissipation_model=dissipation_model,
    dissipation_model_flag=
    dissipation_model_flag,  #1 -- K-epsilon, 2 -- K-omega 1998, 3 -- K-omega 1988
    useMetrics=ct.useMetrics,
    rho_0=ct.rho_0,
    nu_0=ct.nu_0,
    rho_1=ct.rho_1,
    nu_1=ct.nu_1,
    g=ct.g,
    nd=nd,
    c_mu=0.09,
    sigma_k=1.0,
    sc_uref=ct.kappa_sc_uref,
    sc_beta=ct.kappa_sc_beta)

dirichletConditions = {0: lambda x, flag: domain.bc[flag].k_dirichlet}
advectiveFluxBoundaryConditions = {
    0: lambda x, flag: domain.bc[flag].k_advective
}
diffusiveFluxBoundaryConditions = {
Beispiel #4
0
RD_model = None
LS_model = None
ME_model = 1
dissipation_model = 2

coefficients = Kappa.Coefficients(
    V_model=int(movingDomain) + 0,
    ME_model=ME_model,
    LS_model=LS_model,
    RD_model=RD_model,
    dissipation_model=dissipation_model,
    #1 -- K-epsilon, 2 -- K-omega 1998, 3 -- K-omega 1988
    dissipation_model_flag=dissipation_model_flag,
    useMetrics=user_param.useMetrics,
    rho_0=user_param.rho_water,
    nu_0=user_param.nu_water,
    rho_1=user_param.rho_air,
    nu_1=user_param.nu_air,
    #g=user_param.gravity,
    g=numpy.array(
        [user_param.gravity[0], user_param.gravity[1], user_param.gravity[2]],
        dtype='d'),
    nd=user_param.nd,
    c_mu=0.09,
    sigma_k=1.0,
    sc_uref=user_param.kappa_sc_uref,
    sc_beta=user_param.kappa_sc_beta)

dirichletConditions = {
    0: lambda x, flag: domain.bc[flag].k_dirichlet.init_cython()
}
advectiveFluxBoundaryConditions = {
Beispiel #5
0
RD_model = None
LS_model = None
ME_model = 1
dissipation_model = 2

coefficients = Kappa.Coefficients(
    V_model=0 + int(movingDomain),
    ME_model=ME_model,
    LS_model=LS_model,
    RD_model=RD_model,
    dissipation_model=dissipation_model,
    dissipation_model_flag=
    dissipation_model_flag,  # 1=K-epsilon, 2=K-omega 1998, 3=K-omega 1988
    useMetrics=useMetrics,  # main_param.useMetrics,
    rho_0=rho_0,  # main_param
    nu_0=nu_0,  # main_param
    rho_1=rho_1,  # main_param
    nu_1=nu_1,  # main_param
    g=gravity,
    nd=nd,  #main_param.nd,
    c_mu=0.09,
    sigma_k=1.0,
    sc_uref=kappa_sc_uref,  # main_param
    sc_beta=kappa_sc_beta  # main_param
)
'''
dirichletConditions = {
  0: lambda x, flag: domain.bc[flag].k_dirichlet.init_cython()
}

advectiveFluxBoundaryConditions = {
Beispiel #6
0
    ME_model = 5
    dissipation_model = 6
#
dissipation_model_flag = 1
if ct.useRANS >= 2:
    dissipation_model_flag = 2

coefficients = Kappa.Coefficients(
    V_model=0 + int(ct.movingDomain),
    ME_model=ME_model + int(ct.movingDomain),
    LS_model=LS_model + int(ct.movingDomain),
    RD_model=RD_model + int(ct.movingDomain),
    dissipation_model=dissipation_model + int(ct.movingDomain),
    dissipation_model_flag=dissipation_model_flag +
    int(ct.movingDomain),  #1 -- K-epsilon, 2 -- K-omega
    useMetrics=useMetrics,
    rho_0=rho_0,
    nu_0=nu_0,
    rho_1=rho_1,
    nu_1=nu_1,
    g=g,
    c_mu=ct.opts.c_mu,
    sigma_k=ct.opts.sigma_k,
    sc_uref=kappa_sc_uref,
    sc_beta=kappa_sc_beta)

kInflow = ct.kInflow

dirichletConditions = {
    0: lambda x, flag: domain.bc[flag].k_dirichlet.init_cython()
}
Beispiel #7
0
dissipation_model_flag = 1
if ct.useRANS >= 2:
    dissipation_model_flag = 2

coefficients = Kappa.Coefficients(
    V_model=ct.V_model,
    ME_model=ct.K_model,
    LS_model=ct.LS_model,
    RD_model=ct.RD_model,
    dissipation_model=ct.EPS_model,
    SED_model=ct.SED_model,
    dissipation_model_flag=dissipation_model_flag +
    int(ct.movingDomain),  #1 -- K-epsilon, 2 -- K-omega
    useMetrics=useMetrics,
    rho_0=rho_0,
    nu_0=nu_0,
    rho_1=rho_1,
    nu_1=nu_1,
    g=g,
    nd=ct.nd,
    c_mu=ct.opts.Cmu,
    sigma_k=ct.opts.sigma_k,
    sc_uref=kappa_sc_uref,
    sc_beta=kappa_sc_beta,
    closure=ct.sedClosure)

kInflow = ct.kInflow

dirichletConditions = {
    0: lambda x, flag: domain.bc[flag].k_dirichlet.init_cython()