advectiveFluxBoundaryConditions = {0: getAFBC_h, 1: getAFBC_u, 2: getAFBC_v} def getDFBC_u(x, flag): if flag == 0: return lambda x, t: 0.0 else: return None def getDFBC_v(x, flag): if flag == 0: return lambda x, t: 0.0 else: return None diffusiveFluxBoundaryConditions = {0: {}, 1: {1: getDFBC_u}, 2: {2: getDFBC_v}} ######################################### ##### CREATE MODEL AND COEFFICIENTS ##### ######################################### bathymetry = {0: bathymetry_function} LevelModelType = SW2DCV.LevelModel coefficients = SW2DCV.Coefficients(g=g, bathymetry=bathymetry, cE=cE, LUMPED_MASS_MATRIX=LUMPED_MASS_MATRIX, LINEAR_FRICTION=LINEAR_FRICTION, mannings=mannings)
advectiveFluxBoundaryConditions = {0: getAFBC_h, 1: getAFBC_u, 2: getAFBC_v} def getDFBC_u(x, flag): if flag == 0: return lambda x, t: 0.0 else: return None def getDFBC_v(x, flag): if flag == 0: return lambda x, t: 0.0 else: return None diffusiveFluxBoundaryConditions = {0: {}, 1: {1: getDFBC_u}, 2: {2: getDFBC_v}} ######################################### ##### CREATE MODEL AND COEFFICIENTS ##### ######################################### bathymetry = {0: bathymetry_function} LevelModelType = SW2DCV.LevelModel coefficients = SW2DCV.Coefficients(g=g, bathymetry=bathymetry, cE=cE, LUMPED_MASS_MATRIX=LUMPED_MASS_MATRIX, mannings=mannings)
g = physical_parameters['gravity'] LINEAR_FRICTION = physical_parameters['LINEAR_FRICTION'] mannings = physical_parameters['mannings'] # NUMERICAL PARAMETERS # cE = numerical_parameters['cE'] LUMPED_MASS_MATRIX = numerical_parameters['LUMPED_MASS_MATRIX'] # ********************************** # # ********** COEFFICIENTS ********** # # ********************************** # LevelModelType = SW2DCV.LevelModel coefficients = SW2DCV.Coefficients( g=g, bathymetry={0: bathymetry} if bathymetry is not None else None, cE=cE, LUMPED_MASS_MATRIX=LUMPED_MASS_MATRIX, LINEAR_FRICTION=LINEAR_FRICTION, mannings=mannings) # **************************************** # # ********** INITIAL CONDITIONS ********** # # **************************************** # initialConditions = { 0: initialConditions['water_height'], 1: initialConditions['x_mom'], 2: initialConditions['y_mom'] } # ***************************************** # # ********** BOUNDARY CONDITIONS ********** #