コード例 #1
0
bcBottom2.setVar('specifiedMassFlux', 0.0)
bcTop2.bcType = 'SpecifiedMassFlux'
bcTop2.setVar('specifiedMassFlux', 0.0)

soptions = smodel.getOptions()

# A = Phi_S    B = Phi_E
#soptions.setVar('A_coeff',0.107016884)
#soptions.setVar('B_coeff',1.6884e-5)
soptions.ButlerVolmer = True
soptions.setVar('interfaceUnderRelax', 1.0)
soptions.setVar('ButlerVolmerRRConstant', 5.0e-7)
#soptions.setVar('initialMassFraction',0.0)

solver = fvmbaseExt.BCGStab()
pc = fvmbaseExt.JacobiSolver()
pc.verbosity = 0
solver.preconditioner = pc
solver.relativeTolerance = 1e-14  #solver tolerance
solver.absoluteTolerance = 1e-14  #solver tolerance
solver.nMaxIterations = 100
solver.maxCoarseLevels = 30
solver.verbosity = 0
soptions.linearSolver = solver
soptions.relativeTolerance = 1e-14  #model tolerance
soptions.absoluteTolerance = 1e-14  #model tolerance

######################################################
## Potential Model
######################################################
コード例 #2
0
ファイル: testFlowParallel.py プロジェクト: wuhao1938/fvm
## set viscosity and density, this is done per mesh since each mesh has its own VC object
vcMap = fmodel.getVCMap()
for vc in vcMap.values():
    vc.setVar('density', 1.0)
    vc.setVar('viscosity', 0.1)
#########################
conn = meshes[0].getCellCells()
semi_bandwidth_mom = 3
#spike_storage_mom = fvmbaseExt.SpikeStorage(conn, semi_bandwidth_mom)
#pcMom = fvmbaseExt.SpikeSolver(spike_storage_mom)
#pcMom = fvmbaseExt.JacobiSolver()
#pcMom = fvmbaseExt.ILU0Solver()
pcMom = fvmbaseExt.AMG()
pcMom.verbosity = 0

momSolver = fvmbaseExt.JacobiSolver()
#momSolver.smootherType = fvmbaseExt.AMG.JACOBI
#momSolver.preconditioner=pcMom
momSolver.relativeTolerance = 1e-1
momSolver.nMaxIterations = 200
momSolver.maxCoarseLevels = 0
momSolver.verbosity = 0
if MPI.COMM_WORLD.Get_rank() == 0:
    momSolver.verbosity = 0

#########################
semi_bandwidth_con = 3
#spike_storage_con = fvmbaseExt.SpikeStorage(conn, semi_bandwidth_con)
#pcCon = fvmbaseExt.SpikeSolver(spike_storage_con)
#pcCon = fvmbaseExt.JacobiSolver()
#pcCon = fvmbaseExt.ILU0Solver()