Inputs

The mdss package requires an yaml file to configure and execute simulations.

YAML Configuration File

A YAML file is required to define the simulation parameters and organize test cases. The YAML file structure and respective descriptions are given below.

Input YAML file Structure

The YAML file organizes simulation data into a structured hierarchy, enabling clear configuration of cases and experimental conditions. Below is the structure used in the YAML file:

Example YAML file
out_dir:                                                # str, path to the output directory
python_version:  /usr/bin/python                        # Optional[str], path to the python env to use
machine_type: local                                     # str, local/hpc
nproc: 8                                                # int, number of processors, required when machine_type is local

######################################################################################
# `hpc_info` is required only if machine_type is hpc
######################################################################################
hpc_info:                                               # dict, required only if machine_type is hpc
  cluster: GL                                           # str, name of the cluster. GL for Great Lakes
  job_name: example                                     # str, name of the job
  account_name: test_account                            # str, account name
  partition: standard                                   # str, partition name
  time:   01:00:00                                      # str, time in D-H:M:S format
  nodes:  1                                             # int, number of nodes
  nproc:  10                                            # int, total number of processors
  nproc_per_node: 10                                    # int, number of processors per node
  mem_per_cpu: 1000mb                                   # Optional[str], memory per cpu
  mail_types: NONE                                      # Optional[str], mail types
  email_id:  example@test.com                           # Optional[str], email id

hierarchies:                                            # list[dict], List of hierarchies

# First hierarchy
- name: first_hierarchy                                 # str, name of the hierarchy

  cases:                                                # list[dict], list of cases in this hierarchy

  # First case in the hierarchy
  - name:  first_case                                   # str, name of the case
    meshes_folder_path: grids/                          # str, path to the folder containing the mesh files for this case
    mesh_files:                                         # list[str], list of mesh file names
    - mesh_L0.cgns                                      # str, name of the first mesh file
    - mesh_L1.cgns                                      # str, name of the second mesh file

    geometry_info:                                      # dict, dictionary of geometry info
      chordRef: 1.0                                     # float, reference chord length
      areaRef: 1.0                                      # float, reference area

    aero_options:                                       # Optional[dict], dictionary of ADflow solver parameters. For more information see aero options section
      # ......
  
    scenarios:                                          # list[dict], list of dictionaries containing scenario info
   
    # First experimental set in current case
    - name:  cruise                                     # str, name of the scenario
      aoa_list:                                         # list[float], list of angle of attacks(AoA) to run in with the experimental info
      - 0.0
      - 2.0
      reynolds: 9.0e6                                   # float, Reynold's number 
      mach: 0.2                                         # float, Mach number
      Temp: 298                                         # float, Temperature in Kelvin scale
      exp_data: exp_data/first_case.csv                 # str, path to experimental data
    
    # Second scenario in current case

    ######################################################################################
    # The following structural options are required only for Aero-structural problems
    ######################################################################################
    struct_options:                                     # dict, structural options,
      isym: 1                                           # int, direction of symmetry. 1 for y-symmetry, 2 for z-symmetry
      t: 0.005                                          # float, Shell Thickness in m
      mesh_fpath: /path/to/structural/mesh              # str, path to the structural mesh file

      struct_properties:                                # Optional[dict], a dictionary containing structural properties
        rho: 2500.0                                     # Optional[float], Density in kg/m^3
        E: 70.0e9                                       # Optional[float], Young's modulus in N/m^2
        nu: 0.30                                        # Optional[float], Poisson's ratio
        kcorr: 0.83333                                  # Optional[float}, Shear correction factor
        ys: 350.0e6                                     # Optional[float], Yield stress in N/m^2

      load_info:                                        # Optional[dict], a dictionary containing load info 
        g: [0.0, -9.81, 0.0]                            # Optional[list[float]], g-vector in m/s^2, the default is [0, -9.81, 0]
        inertial_load_factor: 1.0                       # optional[float], times of 'g'.

      solver_options:                                   # Optional[dict], solver options for coupling. Check solver options section for more info
        linear_solver_options:                          # Optional[dict], linear solver options, see documentation for more info.
        nonlinear_solver_options:                       # Optional[dict], nonlinear solver options, see documentation for more info.
                      
  # Second case in current hierarchy

# Second hierarchy

Please note that adherence to this structure is essential; any deviation may lead to errors when running simulations. Examples of correctly formatted YAML files are provided in the examples/inputs folder.

These yaml script can also be used as a starting point for generating custom YAML files.

Aero Options

aero_options is a dictionary containing options specific to the ADflow CFD solver, allowing users to customize the solver’s behavior to suit their simulation needs. Detailed descriptions of these parameters and their usage can be found in the ADflow Documentation.

If the dictionary is empty or if the default parameters are not modified, the code will use a predefined set of default solver options. These defaults are designed to provide a reliable baseline configuration for running simulations effectively without requiring manual adjustments.

Default aero_options for aerodynamic problem

 # Print Options
"printIterations": False,
"printAllOptions": False,
"printIntro": False,
"printTiming": False,
# I/O Parameters
"outputDirectory": ".",
"monitorvariables": ["resrho", "resturb", "cl", "cd", "yplus"],
"writeTecplotSurfaceSolution": True,
"solutionPrecision": "double",                                      #  Best for restart
"volumeVariables": ['resrho', 'mach'],
# Physics Parameters
"equationType": "RANS",
"liftindex": 3,                                                     # z is the lift direction
# Solver Parameters
"smoother": "DADI",
"CFL": 0.5,
"CFLCoarse": 0.25,
"MGCycle": "sg",
"MGStartLevel": -1,
"nCyclesCoarse": 250,
# ANK Solver Parameters
"useANKSolver": True,
"nSubiterTurb": 5,
# Termination Criteria
"L2Convergence": 1e-12,
"L2ConvergenceCoarse": 1e-2,
"nCycles": 75000,

Default aero_options for aerostructural problems

 # Print Options
"printIterations": False,
"printAllOptions": False,
"printIntro": False,
"printTiming": False,
# I/O Parameters
"outputDirectory": '.',
"monitorvariables": ["resrho", "resturb", "cl", "cd", "yplus"],
"writeTecplotSurfaceSolution": True,
# Physics Parameters
"equationType": "RANS",
"liftindex": 3,                                                   # z is the lift direction
# Solver Parameters
"smoother": "DADI",
"CFL": 1.5,
"CFLCoarse": 1.25,
"MGCycle": "sg",
"MGStartLevel": -1,
"nCyclesCoarse": 250,
# ANK Solver Parameters
"useANKSolver": True,
"nSubiterTurb": 5,
# Termination Criteria
"L2Convergence": 1e-12,
"L2ConvergenceCoarse": 1e-2,
"L2ConvergenceRel": 1e-3,
"nCycles": 10000,
# force integration
"forcesAsTractions": False,

Scenarios

To define the problem, referred to as the AeroProblem (focused on aerodynamics), flight conditions along with the name and a list of Angle of Attacks(AoA) is required, and path to the experimental data is optional.

Check mdolab-baseclasses for valid combinations flight conditions.The other properties will be calculated automatically by mdolab-baseclasses based on the specified values and the governing gas laws.

Location of Mesh Files

Specifying the location of the mesh files requires two inputs in every case:

  • meshes_folder_path gets the path to the folder that contains the mesh files

  • mesh_files gets the list of file names, that to be run, in the folder specified above.

Solver Options

solver_options is a dictionary containing options for NonlinearBlockGS and LinearBlockGS solvers available in openMDAO. If these are not provided, the default options will be used. For more more information on these solvers visit the openMDAO documentation

Default solver_options

"linear_solver_options":
  "atol": 1e-08,                         # absolute error tolerance
  "err_on_non_converge": True,           # When True, AnalysisError will be raised if not converged
  "maxiter": 25,                         # maximum number of iterations
  "rtol": 1e-8,                          # relative error tolerance
  "use_aitken": True,                    # set to True to use Aitken

"nonlinear_solver_options":
  "atol": 1e-08,                         # absolute error tolerance
  "err_on_non_converge": True,           # When True, AnalysisError will be raised if not converged
  "reraise_child_analysiserror": False,  # When the option is true, a solver will raise any AnalysisError that arises during sub-solve; when false, it will continue solving.
  "maxiter": 25,                         # maximum number of iterations
  "rtol": 1e-08,                         # relative error tolerance
  "use_aitken": True,                    # set to True to use Aitken