AeroSolver
- class baseclasses.AeroSolver(name, category, defaultOptions={}, options={}, immutableOptions={}, deprecatedOptions={}, comm=None, informs={})[source]
Abstract Class for Aerodynamic Solver Object
AeroSolver Class Initialization
- addFamilyGroup(groupName, families)[source]
Add a custom grouping of families called groupName. The groupName must be distinct from the existing families. All families must in the ‘families’ list must be present in the CGNS file.
- Parameters
- groupNamestr
User-supplied custom name for the family groupings
- familieslist
List of string. Family names to combine into the family group
- checkAdjointFailure(aeroProblem, funcsSens)[source]
Take in a an aeroProblem and check for adjoint failure, Then append the fail flag in funcsSens. Information regarding whether or not the last analysis with the aeroProblem was sucessful is included. This information is included as “funcsSens[‘fail’]”. If the ‘fail’ entry already exits in the dictionary the following operation is performed:
funcsSens[‘fail’] = funcsSens[‘fail’] or <did this problem fail>
In other words, if any one problem fails, the funcsSens[‘fail’] entry will be True. This information can then be used directly in multiPointSparse. For direct interface with pyOptSparse the fail flag needs to be returned separately from the funcs.
- Parameters
- aeroProblempyAero_problem class
The aerodynamic problem to to get the solution for
- funcsSensdict
Dictionary into which the functions are saved.
- checkSolutionFailure(aeroProblem, funcs)[source]
Take in a an aeroProblem and check for failure. Then append the fail flag in funcs. Information regarding whether or not the last analysis with the aeroProblem was sucessful is included. This information is included as “funcs[‘fail’]”. If the ‘fail’ entry already exits in the dictionary the following operation is performed:
funcs[‘fail’] = funcs[‘fail’] or <did this problem fail>
In other words, if any one problem fails, the funcs[‘fail’] entry will be True. This information can then be used directly in multiPointSparse. For direct interface with pyOptSparse the fail flag needs to be returned separately from the funcs.
- Parameters
- aeroProblempyAero_problem class
The aerodynamic problem to to get the solution for
- funcsdict
Dictionary into which the functions are saved.
- getForces(group_name)[source]
Return the set of forces at the locations defined by getSurfaceCoordinates
- getSurfaceCoordinates(group_name)[source]
Return the set of surface coordinates cooresponding to a Particular group name
- getTriangulatedMeshSurface(groupName=None, **kwargs)[source]
This function returns a trianguled verision of the surface mesh on all processors. The intent is to use this for doing constraints in DVConstraints.
- Returns
- surflist
List of points and vectors describing the surface. This may be passed directly to DVConstraint setSurface() function.
- globalNKPreCon(in_vec)[source]
Precondition the residual in in_vec for a coupled Newton-Krylov Method
- setDVGeo(DVGeo, pointSetKwargs=None)[source]
Set the DVGeometry object that will manipulate ‘geometry’ in this object. Note that <SOLVER> does not strictly need a DVGeometry object, but if optimization with geometric changes is desired, then it is required.
- Parameters
- DVGeoA DVGeometry object.
Object responsible for manipulating the geometry.
- pointSetKwargsdict
Keyword arguments to be passed to the DVGeo addPointSet call. Useful for DVGeometryMulti, specifying FFD projection tolerances, etc.
Examples
>>> CFDsolver = <SOLVER>(comm=comm, options=CFDoptions) >>> CFDsolver.setDVGeo(DVGeo)
- setMesh(mesh)[source]
Set the mesh object to the aero_solver to do geometric deformations
- Parameters
- meshMBMesh or USMesh object
The mesh object for doing the warping
- setSurfaceCoordinates(coordinates, groupName=None)[source]
Set the updated surface coordinates for a particular group.
- Parameters
- coordinatesnumpy array
Numpy array of size Nx3, where N is the number of coordinates on this processor. This array must have the same shape as the array obtained with getSurfaceCoordinates()
- groupNamestr
Name of family or group of families for which to return coordinates for.
- solveAdjoint(objective, *args, **kwargs)[source]
Solve the adjoint problem for the desired objective functions.
objectives - List of objective functions
- totalAeroDerivative(objective)[source]
Return the total derivative of the objective with respect to aerodynamic-only variables