-
Notifications
You must be signed in to change notification settings - Fork 6
User documentation
This page gives a complete documentation for the user on how to use (instantiate) the different solvers and modules.
This can be done in a simple Python script, in which the import of CUPyDO has to be performed:
import FSICoupler
The different solvers are instantiated and initialized (i.e. ready to iterate) through their respective interface, resulting in an object fluidSolver or solidSolver.
import SU2Interface
fluidSolver = SU2Interface.SU2Solver(configFileName, nZone, nDim, computationType, nodalLoadsType, withMPI, comm)
- configFileName - the SU2 configuration file with extension (usually *.cfg)
- nZone - the number of SU2 zones (usually 1)
- nDim - the number of physical dimensions
- computationType - possible options are steady for steady computation or unsteady for unsteady computation
- nodalLoadsType - possible options are pressure for SU2 to output pressures (N/m²) at interface node or force to ouput forces (N)
- withMPI - possible options are True for parallel computation or False for serial computation
- comm - the MPI communicator in case of parallel run (None (default) if serial)
import MtfInterface
solidSolver = MtfInterface.MtfSolver(configFileName, computationType)
- configFileName - the Metafor data set file without extension (usually *.py)
- computationType - possible options are steady for quasi-static computation or unsteady for unsteady computation
Advanced options
- MtfSolver.saveAllFacs = (bool), conserve all the FACS from each time step if true
import GetDPInterface
solidSolver = GetDPInterface.GetDPSolver(configFileName, resolutionName, computationType, pyBindings)
- configFileName - the GetDP configuration file without extension (usually *.pro)
- resolutionName - the name of the resolution set in the configuration file
- computationType - possible options are steady for static computation or unsteady for unsteady computation
- pyBindings - possible options are True or False, use the Python bindings of GetDP if true
import RBMIntegratorInterface
solidSolver = RBMIntegratorInterface.RBMIntegrator(configFileName, computationType)
- configFileName - the RBM integrator configuration file with extension (usually *.cfg)
- computationType - possible options are steady for static computation or unsteady for unsteady computation
Dependencies: fluidSolver and solidSolver
The manager is instantiated to create and store the MPI network of each partition of the solvers.
manager = FSICoupler.Manager(fluidSolver, solidSolver, nDim, computationType='steady', comm=None)
- fluidSolver - fluid solver previously instantiated
- solidSolver - solid solver previously instantiated
- nDim - the number of physical dimensions
- computationType - possible options are steady (default) for static computation or unsteady for unsteady computation
- comm - the MPI communicator in case of parallel run (None (default) if serial)
Advanced options
- manager.withFsi = (bool), turn off the mechanical transfer if false (default = True)
- manager.withCht = (bool), turn on the thermal transfer if true (default = False)
Dependencies: fluidSolver, solidSolver and manager
The interpolator is instantiated to map the interpolation (create interpolation matrices) between fluid-solid interface grids. Several interpolation types are available.
Even if data interpolation is not required in case of matching meshes, an index mapping is still required.
interpolator = FSICoupler.MatchingMeshesInterpolator(manager, fluidSolver, solidSolver, comm=None, chtTransferMethod='None', heatTransferCoeff=1.0)
- manager - manager previously instantiated
- fluidSolver - fluid solver previously instantiated
- solidSolver - solid solver previously instantiated
- comm - the MPI communicator in case of parallel run (None (default) if serial)
- chtTransferMethod - possible options are None (default), hFTB, hFFB, FFTB or TFFB depending on the choice of the thermal transfer method
- heatTransferCoeff - value (default = 1.0) of the numerical convective heat transfer coefficient for hFTB or hFFB.
Instantiate conservative interpolator based on CPC2 or TPS.
interpolator = FSICoupler.RBFInterpolator(manager, fluidSolver, solidSolver, RBFradius=0.1, comm = None, chtTransferMethod=None, heatTransferCoeff=1.0)
CPC2:
- manager - manager previously instantiated
- fluidSolver - fluid solver previously instantiated
- solidSolver - solid solver previously instantiated
- RBFradius - value (default = 0.1) of the interpolation radius
- comm - the MPI communicator in case of parallel run (None (default) if serial)
- chtTransferMethod - possible options are None (default), hFTB, hFFB, FFTB or TFFB depending on the choice of the thermal transfer method
- heatTransferCoeff - value (default = 1.0) of the numerical convective heat transfer coefficient for hFTB or hFFB.
TPS:
interpolator = FSICoupler.TPSInterpolator(manager, fluidSolver, solidSolver, comm = None, chtTransferMethod='None', heatTransferCoeff=1.0)
- manager - manager previously instantiated
- fluidSolver - fluid solver previously instantiated
- solidSolver - solid solver previously instantiated
- comm - the MPI communicator in case of parallel run (None (default) if serial)
- chtTransferMethod - possible options are None (default), hFTB, hFFB, FFTB or TFFB depending on the choice of the thermal transfer method
- heatTransferCoeff - value (default = 1.0) of the numerical convective heat transfer coefficient for hFTB or hFFB.
Instantiate consistent interpolator based on CPC2 or TPS.
CPC2:
interpolator = FSICoupler.ConsistentRBFInterpolator(manager, fluidSolver, solidSolver, RBFradius=0.1, comm = None, chtTransferMethod='None', heatTransferCoeff=1.0)
- manager - manager previously instantiated
- fluidSolver - fluid solver previously instantiated
- solidSolver - solid solver previously instantiated
- RBFradius - value (default = 0.1) of the interpolation radius
- comm - the MPI communicator in case of parallel run (None (default) if serial)
- chtTransferMethod - possible options are None (default), hFTB, hFFB, FFTB or TFFB depending on the choice of the thermal transfer method
- heatTransferCoeff - value (default = 1.0) of the numerical convective heat transfer coefficient for hFTB or hFFB.
TPS:
interpolator = FSICoupler.ConsistentTPSInterpolator(manager, fluidSolver, solidSolver, comm = None, chtTransferMethod='None', heatTransferCoeff=1.0)
- manager - manager previously instantiated
- fluidSolver - fluid solver previously instantiated
- solidSolver - solid solver previously instantiated
- comm - the MPI communicator in case of parallel run (None (default) if serial)
- chtTransferMethod - possible options are None (default), hFTB, hFFB, FFTB or TFFB depending on the choice of the thermal transfer method
- heatTransferCoeff - value (default = 1.0) of the numerical convective heat transfer coefficient for hFTB or hFFB.
Dependencies: None
The Criterion is instantiated in order to set the FSI convergence criterion. Only a norm-based criterion is available for now.
criterion = FSICoupler.DispNormCriterion(fsiTolerance, chtTolerance=1e12)
- fsiTolerance - value for the convergence tolerance for the mechanical interaction
- chtTolerance - value for the convergence tolerance for the thermal interaction (default = 1e12)
Dependencies: manager, fluidSolver, solidSolver, interpolator, criterion
The Algorithm is instantiated in order to set the coupling algorithm. Two main choices are available: relaxed block Gauss-Seidel (BGS) or Interface Quasi-Newton (IQN). After initialization, the coupled computation is simply launched with
algorithm.run()
Advanced options
- Algorithm.writeInFSILoop = (bool), print information at each coupling iteration for each time step (unsteady computation, default = False) in the history file. True by default for steady computation.
algorithm = FSICoupler.AlgorithmBGSStaticRelax(manager, fluidSolver, solidSolver, interpolator, criterion, nFSIIterMax, deltaT, timeTot, timeIterTreshold=-1, omega=1.0, comm=None)
- manager - manager previously instantiated
- fluidSolver - fluid solver previously instantiated
- solidSolver - solid solver previously instantiated
- interpolator - interpolator previously instantiated
- criterion - criterion previously instantiated
- nFSIIterMax - maximum number of coupling iterations (per time step if unsteady)
- deltaT - time step for unsteady computation (ignored when steady)
- timeTot - total simulated time (ignored when steady)
- timeIterTreshold - number of time iterations before starting the coupling (default = -1 for steady computation)
- omega - constant value of the relaxation parameter (default = 1.0)
- comm - the MPI communicator in case of parallel run (None (default) if serial)
algorithm = FSICoupler.AlgorithmBGSAitkenRelax(manager, fluidSolver, solidSolver, interpolator, criterion, nFSIIterMax, deltaT, timeTot, timeIterTreshold=-1, omega=1.0, comm=None)
- manager - manager previously instantiated
- fluidSolver - fluid solver previously instantiated
- solidSolver - solid solver previously instantiated
- interpolator - interpolator previously instantiated
- criterion - criterion previously instantiated
- nFSIIterMax - maximum number of coupling iterations (per time step if unsteady)
- deltaT - time step for unsteady computation (ignored when steady)
- timeTot - total simulated time (ignored when steady)
- timeIterTreshold - number of time iterations before starting the coupling (default = -1 for steady computation)
- omega - minimum or maximum value for the relaxation parameter (default = 1.0)
- comm - the MPI communicator in case of parallel run (None (default) if serial)
Advenced options
- AlgorithmBGSAitkenRelax.aitkenCrit = (string), possible values are min or max depending on the desired behavior when setting the relexation parameter at the beginning of each time step. The min option will impose the minimum between the current value and omega, the max option will impose the maximum between the current value and omega.
algorithm = FSICoupler.AlgorithmIQN_ILS(manager, fluidSolver, solidSolver, interpolator, criterion, nbFSIIterMax, deltaT, timeTot, timeIterTreshold=-1, omega=1.0, nbTimeToKeep=0, computeTangentMatrixBasedOnFirstIt = False, comm=None)
- manager - manager previously instantiated
- fluidSolver - fluid solver previously instantiated
- solidSolver - solid solver previously instantiated
- interpolator - interpolator previously instantiated
- criterion - criterion previously instantiated
- nFSIIterMax - maximum number of coupling iterations (per time step if unsteady)
- deltaT - time step for unsteady computation (ignored when steady)
- timeTot - total simulated time (ignored when steady)
- timeIterTreshold - number of time iterations before starting the coupling (default = -1 for steady computation)
- omega - minimum or maximum value for the relaxation parameter (default = 1.0)
- nbTimeToKeep - number of previous time steps (default = 0) that have to be used in the approximation of the tangent matrix
- computeTangentMatrixBasedOnFirstIt - possible options are True or False, allows to build the tangent matrix of a given time step using differences with respect to the first FSI iteration instead of the previous iteration if True
- comm - the MPI communicator in case of parallel run (None (default) if serial)
Advenced options
- AlgorithmIQN_ILS.useQR = (bool), uses QR decomposition as presented in Degroote et al. if true. Uses simple least square if false (not recommended, default = True)
- AlgorithmIQN_ILS.tollQR = (float), tolerance used for the QR decomposition (default = 1.0e-1)
- AlgorithmIQN_ILS.qrFilter = (string), type of QR filtering. Possible choices are Degroote1, Degroote2 and Haelterman (default)