Exemplo n.º 1
0
cuds.add([rvm])

gm = api.GravityModel(name='gravitation')
gm.acceleration = (0, -9.81, 0)
cuds.add([gm])

# boundary condtitions
vel_inlet = api.ConstantVelocityCondition((0.0191, 0, 0), water,
                                          name='vel_inlet')
pres_inlet = api.ZeroGradientPressureCondition(0.0, water, name='pres_inlet')
vf_inlet = api.ConstantVolumeFractionCondition(0.001, water, name='vf_inlet')

vel_outlet = api.InletOutletVelocity((0, 0, 0), water, name='vel_outlet')

pres_outlet = api.ConstantPressureCondition(0.0, water, name='pres_outlet')
vf_outlet = api.InletOutletVolumeFraction(0.001, water, name='vf_outlet')

vel_walls = api.ConstantVelocityCondition((0, 0, 0), water, name='vel_walls')
pres_walls = api.ZeroGradientPressureCondition(0.0, water, name='pres_walls')
vf_walls = api.ZeroGradientVolumeFractionCondition(0.0, water, name='vf_walls')

vel_top = api.FreeSlipVelocity(name='vel_top')
pres_top = api.ZeroGradientPressureCondition(0.0, water, name='pres_top')
vf_top = api.ZeroGradientVolumeFractionCondition(0.0, water, name='vf_top')

vel_frontAndBack = api.EmptyCondition(name='vel_frontAndBack')
vel_frontAndBack.data[CUBA.VARIABLE] = CUBA.VELOCITY
pres_frontAndBack = api.EmptyCondition(name='pres_frontAndBack')
pres_frontAndBack.data[CUBA.VARIABLE] = CUBA.DYNAMIC_PRESSURE
vf_frontAndBack = api.EmptyCondition(name='vf_frontAndBack')
vf_frontAndBack.data[CUBA.VARIABLE] = CUBA.VOLUME_FRACTION
Exemplo n.º 2
0
                               size=1.0e-5)
cuds.add([sim_time])

# solver parameters
sp = api.SolverParameter(name='solver_parameters')
sp.data[CUBA.MAXIMUM_COURANT_NUMBER] = 0.2
cuds.add([sp])

gm = api.GravityModel(name='gravitation')
gm.acceleration = (0, -9.81, 0)
cuds.add([gm])

# boundary conditions
vel_inlet = api.InletOutletVelocity((0, 0, 0), water, name='vel_inlet')
pres_inlet = api.ConstantPressureCondition(0.0, water, name='pres_inlet')
vf_inlet = api.InletOutletVolumeFraction(1.0, water, name='vf_inlet')

vel_atm = api.InletOutletVelocity((0, 0, 0), water, name='vel_atm')
pres_atm = api.ConstantPressureCondition(0.0, water, name='pres_atm')
vf_atm = api.ZeroGradientVolumeFractionCondition(0.0, water, name='vf_atm')

vel_walls = api.ConstantVelocityCondition((0, 0, 0), water, name='vel_walls')
pres_walls = api.ZeroGradientPressureCondition(0.0, water, name='pres_walls')

vf_walls = api.WettingAngle([water, air], contact_angle=45.0, name='vf_walls')

vel_frontAndBack = api.EmptyCondition(name='vel_frontAndBack')
vel_frontAndBack.data[CUBA.VARIABLE] = CUBA.VELOCITY
pres_frontAndBack = api.EmptyCondition(name='pres_frontAndBack')
pres_frontAndBack.data[CUBA.VARIABLE] = CUBA.DYNAMIC_PRESSURE
vf_frontAndBack = api.EmptyCondition(name='vf_frontAndBack')