本文整理汇总了Python中FluentCase.FluentCase.importFlowBCs方法的典型用法代码示例。如果您正苦于以下问题:Python FluentCase.importFlowBCs方法的具体用法?Python FluentCase.importFlowBCs怎么用?Python FluentCase.importFlowBCs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FluentCase.FluentCase
的用法示例。
在下文中一共展示了FluentCase.importFlowBCs方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from FluentCase import FluentCase [as 别名]
# 或者: from FluentCase.FluentCase import importFlowBCs [as 别名]
mesh0 = meshes[0]
import time
t0 = time.time()
geomFields = fvm.models.GeomFields('geom')
metricsCalculator = fvm.models.MeshMetricsCalculatorA(geomFields,meshes)
metricsCalculator.init()
flowFields = fvm.models.FlowFields('flow')
fmodel = fvm.models.FlowModelA(geomFields,flowFields,meshes)
reader.importFlowBCs(fmodel)
#fmodel.printBCs()
momSolver = fvmbaseExt.AMG()
momSolver.relativeTolerance = 1e-1
momSolver.absoluteTolerance = 1e-25
#momSolver.nMaxIterations = 20
#momSolver.maxCoarseLevels=20
momSolver.verbosity=0
#contSolver = fvmbaseExt.AMG()
pc = fvmbaseExt.AMG()
pc.verbosity=1
contSolver = fvmbaseExt.BCGStab()
contSolver.preconditioner = pc
contSolver.relativeTolerance = 1e-1
示例2:
# 需要导入模块: from FluentCase import FluentCase [as 别名]
# 或者: from FluentCase.FluentCase import importFlowBCs [as 别名]
geomFields = models.GeomFields('geom')
metricsCalculator = models.MeshMetricsCalculatorA(geomFields,meshes)
metricsCalculator.init()
if atype == 'tangent':
metricsCalculator.setTangentCoords(0,7,1)
flowFields = models.FlowFields('flow')
fmodel = models.FlowModelA(geomFields,flowFields,meshes)
thermalFields = models.ThermalFields('temperature')
tmodel = models.ThermalModelA(geomFields,thermalFields,meshes)
reader.importFlowBCs(fmodel,meshes)
bcMap = fmodel.getBCMap()
bcMapTherm = tmodel.getBCMap()
bcMapTherm[7].bcType = 'Symmetry'
for i in [5,6,7,8,9,10]:
bc = bcMap[i]
bc.bcType = 'Symmetry'
bcMapTherm.bcType = 'Symmetry'
#bc.bcType = 'NoSlipWall'
fmodel.printBCs()
tmodel.printBCs()
vcmap = tmodel.getVCMap()
vcZone = vcmap[meshes[0].getID()]
vcZone['thermalConductivity'] = 1.0E-10
vcZone['density'] = 1000.0
示例3:
# 需要导入模块: from FluentCase import FluentCase [as 别名]
# 或者: from FluentCase.FluentCase import importFlowBCs [as 别名]
if id in bcMap:
bc = bcMap[id]
bc.bcType = "Symmetry"
vcMap = pd.emodel.getVCMap()
for i,vc in vcMap.iteritems():
vc.vcType = "dielectric"
vc['dielectric_constant'] = dielectric_constant
### flow model and boundary condition ###
pd.flowFields = models.FlowFields('flow')
pd.fmodel = models.FlowModelA(pd.geomFields,pd.flowFields,pd.fluidMeshes)
fluidReader.importFlowBCs(pd.fmodel, pd.fluidMeshes)
#creating client object for coupling
fluid_to_solid = ClientCoupling.ClientCoupling(pd.solidBoundaryMeshes, pd.geomFields)
# electric solver
epc = fvmbaseExt.AMG()
epc.verbosity=0
elecSolver = fvmbaseExt.BCGStab()
elecSolver.preconditioner = epc
elecSolver.relativeTolerance = 1e-3
elecSolver.nMaxIterations = 1000
elecSolver.maxCoarseLevels=20
elecSolver.verbosity=0
eoptions = pd.emodel.getOptions()
示例4:
# 需要导入模块: from FluentCase import FluentCase [as 别名]
# 或者: from FluentCase.FluentCase import importFlowBCs [as 别名]
for i in [fluidSide, fluidTop, fluidLeft, fluidRight]:
if i in bcMap:
bc = bcMap[i]
bc.bcType = "Symmetry"
vcMap = emodel.getVCMap()
for i, vc in vcMap.iteritems():
vc.vcType = "dielectric"
vc["dielectric_constant"] = dielectric_constant
### flow model and boundary condition ###
flowFields = models.FlowFields("flow")
fmodel = models.FlowModelA(geomFields, flowFields, fluidMeshes)
fluidReader.importFlowBCs(fmodel, fluidMeshes)
### ================================= solvers ===================================###
### elec solver ###
epc = fvmbaseExt.AMG()
epc.verbosity = 0
elecSolver = fvmbaseExt.BCGStab()
elecSolver.preconditioner = epc
elecSolver.relativeTolerance = 1e-3
elecSolver.nMaxIterations = 1000
elecSolver.maxCoarseLevels = 20
elecSolver.verbosity = 0
eoptions = emodel.getOptions()
eoptions.electrostaticsLinearSolver = elecSolver