chrono::parsers::ChParserSphYAML Class Reference

Description

Parser for YAML specification files for Chrono::SPH models and simulations.

The parser caches model information and simulation settings from a YAML input file and then allows populating an FSI Chrono::SPH system and setting solver and simulation parameters.

#include <ChParserSphYAML.h>

Inheritance diagram for chrono::parsers::ChParserSphYAML:
Collaboration diagram for chrono::parsers::ChParserSphYAML:

Public Member Functions

 ChParserSphYAML (const std::string &yaml_filename, bool verbose=false)
 
bool HasSolverData () const
 Return true if a YAML solver file has been loaded.
 
bool HasModelData () const
 Return true if a YAML model file has been loaded.
 
void LoadFile (const std::string &yaml_filename)
 Load the specified MBS simulation input YAML file.
 
void LoadSimData (const YAML::Node &yaml)
 Load the simulation, output, and visualization settings from the specified YAML node.
 
void LoadModelData (const YAML::Node &yaml)
 Load the MBS model from the specified YAML node.
 
void LoadSolverData (const YAML::Node &yaml)
 Load the solver parameters from the specified YAML node.
 
double GetTimestep () const
 
double GetEndtime () const
 
std::shared_ptr< fsi::sph::ChFsiProblemSPHCreateFsiProblemSPH (bool initialize=true)
 Create and return a Chrono FSI problem configured from cached model and simulation parameters. More...
 
virtual std::shared_ptr< fsi::ChFsiSystemGetFsiSystem () override
 Access the underlying FSI system.
 
virtual std::shared_ptr< fsi::ChFsiFluidSystemGetFluidSystem () override
 Access the underlying fluid system.
 
bool Render () const
 
bool UseSplashurf () const
 
virtual void WriteOutput (int frame, double time) override
 Write simulation output results at the current time.
 
- Public Member Functions inherited from chrono::parsers::ChParserCfdYAML
 ChParserCfdYAML (bool verbose=false)
 
FluidSystemType GetType () const
 Return the fluid system type.
 
- Public Member Functions inherited from chrono::parsers::ChParserYAML
void SetVerbose (bool verbose)
 Set verbose terminal output (default: false).
 
virtual void SetOutputDir (const std::string &out_dir)
 Set root output directory (default: "."). More...
 
const std::string & GetName () const
 Return the name of the YAML model.
 
virtual bool Output () const
 Return true if generating output.
 
ChOutput::Format GetOutputFormat () const
 Return the output type.
 
ChOutput::Mode GetOutputMode () const
 Return the output mode.
 
virtual double GetOutputFPS () const
 Return the output frequency.
 

Additional Inherited Members

- Public Types inherited from chrono::parsers::ChParserCfdYAML
enum  FluidSystemType { SPH, TDPF }
 
- Public Types inherited from chrono::parsers::ChParserYAML
enum  YamlFileType {
  MBS, SPH, TDPF, FSI,
  VEHICLE, UNKNOWN
}
 Type of a Chrono YAML specification file.
 
- Static Public Member Functions inherited from chrono::parsers::ChParserCfdYAML
static FluidSystemType ReadFluidSystemType (const std::string &yaml_filename)
 Peek in specified YAML file and read the fluid system type. More...
 
- Static Public Member Functions inherited from chrono::parsers::ChParserYAML
static YamlFileType ReadYamlFileType (const std::string &yaml_filename)
 Peek in specified YAML file and read the fluid system type. More...
 
- Protected Member Functions inherited from chrono::parsers::ChParserYAML
void ReadOutputParams (const YAML::Node &a)
 Read output settings from specified YAML node.
 
- Static Protected Member Functions inherited from chrono::parsers::ChParserYAML
static YamlFileType ReadYamlFileType (const YAML::Node &a)
 Read the YAML file type.
 
- Protected Attributes inherited from chrono::parsers::ChParserCfdYAML
FluidSystemType m_type
 
- Protected Attributes inherited from chrono::parsers::ChParserYAML
std::string m_name
 name of the YAML model
 
bool m_verbose
 verbose terminal output (default: false)
 
bool m_use_degrees
 all angles given in degrees (default: true)
 
OutputParameters m_output
 output parameters
 
std::string m_output_dir
 root output directory
 
std::shared_ptr< ChOutputm_output_db
 output database
 
ChYamlFileHandler m_file_handler
 handler for data file paths
 

Member Function Documentation

◆ CreateFsiProblemSPH()

std::shared_ptr< fsi::sph::ChFsiProblemSPH > chrono::parsers::ChParserSphYAML::CreateFsiProblemSPH ( bool  initialize = true)

Create and return a Chrono FSI problem configured from cached model and simulation parameters.

By default, the Chrono FSI problem is initialized (with no associated MBS system). If a system is attached after creation, the caller must create the FSI problem with initialize=false, attach an MBS to the problem with ChFsiProblemSPH::AttachMultibodySystem, and then explicitly invoke ChFsiProblemSPH::Initialize().


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_parsers/yaml/ChParserSphYAML.h
  • /builds/uwsbel/chrono/src/chrono_parsers/yaml/ChParserSphYAML.cpp