forked from mlucio89/CUPyDO
-
Notifications
You must be signed in to change notification settings - Fork 7
CUPyDO interface
Adrien Crovato edited this page Oct 9, 2019
·
1 revision
The python file driving the CUPyDO computation consists in two functions: the first contains a list (python dictionary) of parameters used to initialize the interface, while the second runs the actual computations.
Parameters definition
def getFsiP():
# Sample parameters list
p = {}
# Solvers
p['fluidSolver'] = string # fluid solvers available: SU2, Pfem, Flow
p['solidSolver'] = string # solid solvers available: Metafor, RBMI, Modal, GetDP
# Configuration files
p['cfdFile'] = string # path to fluid cfg file
p['csdFile'] = string # path to solid cfg file'
# FSI objects
p['interpolator'] = string # interpolator type available: Matching, RBF, TPS
p['criterion'] = string # convergence criterion available: Displacements
p['algorithm'] = string # FSI algorithms available: Explicit, StaticBGS, AitkenBGS, IQN_ILS
# FSI parameters
# needed by all algos
p['compType'] = string # steady or unsteady
p['nDim'] = int # dimension, 2 or 3
p['dt'] = double # time steps
p['tTot'] = double # total time
p['timeItTresh'] = ? # ?
# needed by BGS
p['tol'] = double # tolerance on displacements
p['maxIt'] = int # maximum number of iterations
p['omega'] = double # relaxation parameter
# needed by IQN-ILS
p['firstItTgtMat'] = bool # compute the Tangent matrix based on first iteration (True or False)
p['nSteps'] = int # number of time steps to keep
# needed by RBF interpolator
p['rbfRadius'] = double # radius of interpolation for RBF
# optional for RBF/TPS interpolators
p['interpOpts'] # optional options for interpolator, [0] = max number of iterations, [1] = preconditionner type
# Solver parameters that should be moved to solver cfg files and handled by the solver interface
p['nodalLoadsType'] = 'Pressure' # for SU2
return p
Computation driver
def main():
import cupydo.interfaces.Cupydo as cupy
p = getFsiP() # get parameters
cupydo = cupy.CUPyDO(p) # create fsi driver
cupydo.run() # run fsi process