Solver options

The following solvers are available for generating predicted responses that can be used during optimisation. The templates below show the options available for each solver. These options can be used to define the solver in the solvers section of the .yaml file.

Analytical curve

# Specification for the analytical curve generator solver

# In the example below, we register two output fields:
# - 'quadratic_curve'
# - 'exponential_curve'
# These are the quantities that are returned from the interface. When using the
# solver with an objective, use their names to define the prediction fields.

solver:
  #
  # Mandatory fields
  # ---------------------------------------------------------------------------
  #
  # Solver name
  name: curve
  #
  # List of cases to run
  # The name of each case is the name of the output field to register. You can
  # have multiple cases.
  cases:
    # Register a 'quadratic_curve' output field that uses the quadratic curve
    # with the expression "<a> * x ** 2", where <a> is a parameter to be
    # optimised, the parametric variable is x, discretised in the range [-5, 5]
    # with 100 points.
    'quadratic_curve':
      expression: <a> * x ** 2 # Expression to use (note the <a> parameter)
      parametric: x # Parametric variable (this is not optimised)
      bounds: [-5, 5] # Bounds for the parametric variable
      points: 100 # Optional, 100 by default
    # Register a 'exponential_curve' output field that uses the exponential
    # curve with the expression "<a> * exp(t)", where <a> is a parameter to be
    # optimised, the parametric variable is t, discretised in the range [-2, 1]
    # with 50 points.
    'exponential_curve':
      expression: <a> * exp(t) # Expression to use (note the <a> parameter)
      parametric: t # Parametric variable (this is not optimised)
      bounds: [-2, 1] # Bounds for the parametric variable
      points: 50 # Optional, 100 by default
  #
  # (Optional) Additional options for the solver
  # Given values are the default ones
  # ---------------------------------------------------------------------------
  #
  # Number of parallel analyses to run
  # Only available when using multiple cases
  parallel: 1
  #
  # Path to store temporary files
  # By default, use a 'tmp' directory inside the output directory
  tmp_dir: output_dir/tmp

Abaqus

# Specification for the Abaqus solver
#
# In the example below, we register one output field:
# - 'reaction_x'
# This is a quantity that is returned from the interface. When using the solver
# with an objective, use their names to define the prediction fields.
#
solver:
  #
  # Mandatory fields
  # ---------------------------------------------------------------------------
  #
  # Solver name
  name: abaqus
  #
  # Path to the Abaqus binary
  abaqus_path: C:\SIMULIA\Commands\abaqus.bat
  #
  # List of cases to run
  # The name of each case is the path to the input file that will be used
  # for the analysis. You can have multiple cases, each with its own input
  # file and fields.
  cases:
    # Example for an input file
    'sample.inp':
      # If the input has only one job this field is optional
      job_name: Job-1 # Job name to extract data
      # If the input has only one step this field is optional
      step_name: Step-1 # Step name to extract data
      # If the input has only one instance this field is optional
      instance_name: PART-1-1 # Step name to extract data
      fields:
        'reaction_x':
          name: FieldsOutput # Name of the output field for abaqus field reader
          set_name: RF_SET # Name of the set to extract the field 
          field: RF # Name of the Y field to extract (e.g. S, U, RF, E or LE)
          x_field: U # Name of the X field to extract (e.g. S, U, RF, E or LE)
          direction: x # Direction to extract the field data
  #
  # (Optional) Additional options for the solver
  # Given values are the default ones
  # ---------------------------------------------------------------------------
  #
  # Number of parallel analyses to run
  # Only available when using multiple cases
  parallel: 1
  #
  # Path to store temporary analyses
  # By default, use a 'tmp' directory inside the output directory
  tmp_dir: output_dir/tmp
  #

CRATE

# Specification for the CRATE solver

# At this moment, the CRATE solver registers one output field `hresFile`,
# corresponding to micro homogenised quantities.
# These are the quantities that are returned from the interface. When using the
# solver with an objective, use their names to define the prediction fields.

solver:
  #
  # Mandatory fields
  # ---------------------------------------------------------------------------
  #
  # Solver name
  name: crate
  #
  # Path to the CRATE executable
  links: CRATE/src/cratepy/main.py
  #
  # List of cases to run
  # The name of each case is the path to the input file that will be used
  # for the analysis. You can have multiple cases, each with its own input
  # file and fields.
  cases:
    # Example for an input file
    'input_file.dat':
      fields:
        # Register a 'micro_homogenised_quantity' output field
        'micro_homogenised_quantity':
          name: hresFile
          y_field: vm_stress # Field/column to extract data (mandatory)
          x_field: vm_strain # Optional, field/column to extract data,
                             # by default LoadFactor
  #
  # (Optional) Additional options for the solver
  # Given values are the default ones
  # ---------------------------------------------------------------------------
  #
  # Number of parallel analyses to run
  # Only available when using multiple cases
  parallel: 1
  #
  # Path to store temporary analyses
  # By default, use a 'tmp' directory inside the output directory
  tmp_dir: output_dir/tmp
  #
  # Python interpreter to use
  # By default 'python3'
  python: python3
  #
  # Path to the microstructure directory
  # By default, uses the 'microstructure' path inside the 'CRATE' input file
  microstructure_dir: .
  #
  # Generator class for advanced input file generation
  # If not passed, use the default generator (which only does parameter
  # substitution in the input file)
  generator:
    #
    # Path to the generator script
    script: design_script.py
    #
    # Generator class to use
    # This class must be derived from the InputData class of the solver
    # interface and should generate the input file for the solver
    # during the prepare() method.
    class: GeneratorClass