chrono::parsers::ChParserTdpfYAML Class Reference

Description

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

The parser caches model information and simulation settings from the corresponding YAML input files and then allows populating an FSI Chrono::TDPF system and setting solver and simulation parameters.

#include <ChParserTdpfYAML.h>

Inheritance diagram for chrono::parsers::ChParserTdpfYAML:
Collaboration diagram for chrono::parsers::ChParserTdpfYAML:

Public Member Functions

 ChParserTdpfYAML (const std::string &yaml_model_filename, const std::string &yaml_sim_filename, bool verbose=false)
 Create a YAML parser and load the model from the specified input YAML file.
 
bool HasSimulationData () const
 Return true if a YAML simulation file has been loaded.
 
bool HasModelData () const
 Return true if a YAML model file has been loaded.
 
void LoadModelFile (const std::string &yaml_filename)
 Load the model from the specified input YAML model file.
 
void LoadSimulationFile (const std::string &yaml_filename)
 Load the simulation parameters from the specified input YAML simulation file.
 
std::shared_ptr< fsi::tdpf::ChFsiSystemTDPFCreateFsiSystemTDPF (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
 
virtual void SaveOutput (int frame) override
 Save 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).
 
void SetOutputDir (const std::string &out_dir)
 Set root output directory (default: "").
 
const std::string & GetName () const
 Return the name of the YAML model.
 
virtual bool Output () const
 Return true if generating output.
 
ChOutput::Type GetOutputType () const
 Return the output type.
 
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  DataPathType { ABS, REL }
 
- 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...
 
- Protected Member Functions inherited from chrono::parsers::ChParserYAML
std::string GetDatafilePath (const std::string &filename)
 Return the path to the specified data file.
 
- Static Protected Member Functions inherited from chrono::parsers::ChParserYAML
static void CheckVersion (const YAML::Node &a)
 
static std::string ToUpper (std::string in)
 
static DataPathType ReadDataPathType (const YAML::Node &a)
 Read the data path type (absolute or relative).
 
static ChVector3d ReadVector (const YAML::Node &a)
 Load and return a ChVector3d from the specified node.
 
static ChQuaterniond ReadQuaternion (const YAML::Node &a)
 Load and return a ChQuaternion from the specified node.
 
static ChQuaterniond ReadCardanAngles (const YAML::Node &a, bool use_degrees)
 Load a Cardan angle sequence from the specified node and return as a quaternion. More...
 
static ChQuaterniond ReadRotation (const YAML::Node &a, bool use_degrees)
 Return a quaternion loaded from the specified node. More...
 
static ChCoordsysd ReadCoordinateSystem (const YAML::Node &a, bool use_degrees)
 Load and return a coordinate system from the specified node.
 
static std::shared_ptr< ChFunctionReadFunction (const YAML::Node &a, bool use_degrees)
 Load and return a ChFunction object from the specified node.
 
static ChColor ReadColor (const YAML::Node &a)
 Load and return a ChColor from the specified node.
 
static ChOutput::Type ReadOutputType (const YAML::Node &a)
 
static ChOutput::Mode ReadOutputMode (const YAML::Node &a)
 
static void PrintNodeType (const YAML::Node &node)
 Print YAML node 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)
 
std::string m_output_dir
 root oputput directory
 
std::shared_ptr< ChOutputm_output_db
 output database
 
DataPathType m_data_path
 
std::string m_rel_path
 
std::string m_script_directory
 
OutputParameters m_output
 

Member Function Documentation

◆ CreateFsiSystemTDPF()

std::shared_ptr< fsi::tdpf::ChFsiSystemTDPF > chrono::parsers::ChParserTdpfYAML::CreateFsiSystemTDPF ( 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, and then explictly initialize the FSI problem.


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