Class for running 0D simulations.
More...
#include <Solver.h>
|
| | Solver (const nlohmann::json &config) |
| | Construct a new Solver object.
|
| |
| void | run () |
| | Run the simulation.
|
| |
| std::string | get_full_result () const |
| | Get the full result as a csv encoded string.
|
| |
| Eigen::VectorXd | get_single_result (const std::string &dof_name) const |
| | Get the result of a single DOF over time.
|
| |
| double | get_single_result_avg (const std::string &dof_name) const |
| | Get the result of a single DOF averaged over time.
|
| |
| std::vector< double > | get_times () const |
| | Get the time steps of the result.
|
| |
| void | update_block_params (const std::string &block_name, const std::vector< double > &new_params) |
| | Update the parameters of a block.
|
| |
| std::vector< double > | read_block_params (const std::string &block_name) |
| | Read the parameters of a block.
|
| |
| void | write_result_to_csv (const std::string &filename) const |
| | Write the result to a csv file.
|
| |
Class for running 0D simulations.
The solver solves for pressure and flow rate at the nodes of the lumped-parameter system [7]. The lumped-parameter network is documented in SparseSystem. Refer to Integrator for the time discretization.
◆ Solver()
| Solver::Solver |
( |
const nlohmann::json & | config | ) |
|
Construct a new Solver object.
- Parameters
-
| config | Configuration handler |
◆ get_full_result()
| std::string Solver::get_full_result |
( |
| ) |
const |
Get the full result as a csv encoded string.
- Returns
- std::string Result
◆ get_single_result()
| Eigen::VectorXd Solver::get_single_result |
( |
const std::string & | dof_name | ) |
const |
Get the result of a single DOF over time.
- Parameters
-
| dof_name | Name of the degree-of-freedom |
- Returns
- Eigen::VectorXd Result
◆ get_single_result_avg()
| double Solver::get_single_result_avg |
( |
const std::string & | dof_name | ) |
const |
Get the result of a single DOF averaged over time.
- Parameters
-
| dof_name | Name of the degree-of-freedom |
- Returns
- double Result
◆ get_times()
| std::vector< double > Solver::get_times |
( |
| ) |
const |
Get the time steps of the result.
- Returns
- std::vector<double> Vector of times
◆ read_block_params()
| std::vector< double > Solver::read_block_params |
( |
const std::string & | block_name | ) |
|
Read the parameters of a block.
- Parameters
-
| block_name | Name of the block |
- Returns
- std::vector<double> Block parameters
◆ run()
◆ update_block_params()
| void Solver::update_block_params |
( |
const std::string & | block_name, |
|
|
const std::vector< double > & | new_params ) |
Update the parameters of a block.
- Parameters
-
| block_name | Name of the block |
| new_params | New parameters |
◆ write_result_to_csv()
| void Solver::write_result_to_csv |
( |
const std::string & | filename | ) |
const |
Write the result to a csv file.
- Parameters
-
The documentation for this class was generated from the following files: