About the Project¶
+About the Project¶
Project History¶
+Project History¶
Since 2023, HydroChrono has been developed jointly by NREL and TotalEnergies to simulate offshore renewable energy systems (namely wave energy converters, WECs, and floating offshore wind turbines, FOWTs).
HydroChrono began as an effort to overcome some limitations in the WEC modeling field (e.g. added mass, speed, licensing, modeling capabilities).
By using Project Chrono, we ultimately aim to create a multifidelity simulation framework, where system models can be easily simualted with either potential flow hydrodynamics or high fidelity methods such as CFD and SPH.
Contributors¶
+Contributors¶
Zuriah Quinton
Dave Ogden
@@ -70,7 +70,7 @@ Email:
hydrochrono@outlook.com
@@ -78,7 +78,7 @@ FAQ 1: Is HydroChrono open-source?
-
@@ -107,13 +107,13 @@
- About the Project
@@ -121,18 +121,18 @@
Table of Contents
- - index
- - next |
- - previous | -
- HydroChrono 0.1 documentation » +
- HydroChrono 0.1 documentation »
- About the Project
General Naming Rules: - Opt for clarity and completeness over brevity. @@ -111,7 +111,7 @@
Google C++ Style Guide Highlights -
Code Standards¶
+Code Standards¶
Adhere to the points mentioned above and the full Google C++ Style Guide.
Provide comprehensive comments for any non-trivial code.
@@ -119,7 +119,7 @@ Fork and Clone: - Fork the HydroChrono repository on the platform where it’s hosted (e.g., GitHub). @@ -144,7 +144,7 @@
Submitting Contributions -
Contribution Best Practices¶
+Contribution Best Practices¶
Collaboration: Encourage collaboration with other contributors. Open discussions can lead to better solutions.
Stay Updated: Regularly pull the latest changes from the upstream main branch and stay updated with the project’s progress and changes.
@@ -152,7 +152,7 @@
Contribution Best Practices -
Conclusion¶
+Conclusion¶
Whether you’re adding new features, bug fixes, or simply improving documentation, your contributions are invaluable and greatly appreciated.
Code Standards -
Submitting Contributions¶
+Submitting Contributions¶
- Source Code Documentation
-
-
- H5 Reader -
- Some Helper Functions -
- Hydrodynamic Modeling -
- Wave Options -
- Added Mass +
- Source Code Documentation
Table of Contents
This Page
Quick search
Navigation
Clone this project into a directory and set up a build folder. - For instance, clone the project into a HydroChrono directory and set up a HydroChrono_build adjacent directory.
@@ -78,7 +78,7 @@ Copy the chrono_build/bin/data file from the Project Chrono build directory to HydroChrono_build/data to obtain optional shaders and logos.
Navigate to the chrono_build/bin/RelWithDebInfo directory and copy all .dll and .pdb files (excluding those for demos) to HydroChrono_build/demos/RelWithDebInfo. Files to copy include:
@@ -96,7 +96,7 @@Post-Build Steps -
Running Demos¶
+Running Demos¶
To run the demos, navigate to HydroChrono_build/demos/RelWithDebInfo.
Demos require a command line argument indicating the location of input files. To specify this:
@@ -118,14 +118,14 @@Running Demos
Previous topic
-Next topic
-This Page
Quick search
Navigation
Prerequisites — HydroChrono 0.1 documentation - - - - + + + + - - - - - + + + + + - - - - - + + + + +Navigation
- - index
- - next |
- - previous | -
- HydroChrono 0.1 documentation » +
- HydroChrono 0.1 documentation »
- Prerequisites
Navigation
- Prerequisites¶
+Prerequisites¶
- Introduction¶
+Introduction¶
This page provides a detailed list of prerequisites and installation guidelines for users who wish to use HydrChrono. It covers the necessary software, libraries, and additional tools.
- Section 1: Chrono and Dependencies¶
+Section 1: Chrono and Dependencies¶
Before proceeding with the scientific software installation, users need to ensure they have Chrono v8.0.0 installed and built.
For detailed instructions on how to install and build Chrono, please refer to the Chrono Install/Build Guide. For visualization, insure this build includes the Irrlicht module.
Below are the necessary dependencies and the recommended versions:
@@ -71,7 +71,7 @@Section 1: Chrono and Dependencies -
Section 2: H5Cpp from HDF5Group¶
+Section 2: H5Cpp from HDF5Group¶
Users need to install the H5Cpp header file from HDF5Group. We recommend using version 1.10.8 as other versions may not be fully compatible.
Note
@@ -94,7 +94,7 @@Section 2: H5Cpp from HDF5Group -
Section 4: Optional Tools¶
+Section 4: Optional Tools¶
Gnuplot or any other plotting software of your choice. Learn more at Gnuplot Home <http://www.gnuplot.info/>.
For users interested in Python integration, it is recommended to install and build PyChrono. Follow the instructions provided by Project Chrono. This guide also covers the installation of SWIG for generating python files from C++ code.
@@ -110,13 +110,13 @@ - - index
- - next |
- - previous | -
- HydroChrono 0.1 documentation » +
- HydroChrono 0.1 documentation »
- Prerequisites
- - index
- - next |
- - previous | -
- HydroChrono 0.1 documentation » +
- HydroChrono 0.1 documentation »
- Workflow
- Create a mesh representing the bodies in the system that will experience hydrodynamic loads.
HydroChrono ensures that the full dense added mass matrix is integrated into the mass matrix that Chrono resolves.
The hydrodynamic functions are represented as Chrono ChFunctions. In essence, Chrono is efficiently solving the complete Cummins equation through a tightly-coupled approach.
Time-series data can be obtained and saved using the standard options available in Chrono.
- - index
- - next |
- - previous | -
- HydroChrono 0.1 documentation » +
- HydroChrono 0.1 documentation »
- Workflow
- - index
- - next |
- - previous | -
- HydroChrono 0.1 documentation » +
- HydroChrono 0.1 documentation »
- Theory
Section 4: Optional Tools
Previous topic
-Next topic
-This Page
Quick search
Navigation
Workflow — HydroChrono 0.1 documentation - - - - + + + + - - - - - + + + + + - - - - - + + + + +Navigation
Navigation
- Workflow¶
- +Workflow¶
+- Introduction¶
+Introduction¶
This page outlines the typical workflow for using HydroChrono to simulate hydrodynamic loads on bodies. It covers the stages from mesh creation to data output.
- Mesh Creation¶
+Mesh Creation¶
- Chrono Model Creation¶
+Chrono Model Creation¶
- Run the Model¶
+Run the Model¶
- Data Output¶
+Data Output¶
Data Output
Previous topic
-Next topic
-This Page
Quick search
Navigation
Theory — HydroChrono 0.1 documentation - - - - + + + + - - - - - + + + + + - - - - - + + + + +Navigation
Navigation
- Theory¶
+Theory¶
- Multibody dynamics theory in Project Chrono¶
+Multibody dynamics theory in Project Chrono¶
In this section, the fundamental multibody dynamics theory used by Chrono is described. For a multibody system comprising \(n_b\) bodies, the generalized position of each body \(i\) is represented by the vector \(r_i = [x_i, y_i, z_i]^T\), and its orientation is given by the Euler angles, \(e_i = [\psi_i, \theta_i, \phi_i]^T\). Hence, the generalized coordinates for the entire system can be expressed as:
-(1)¶\[q = [r_1^T e_1^T \dots r_{n_b}^T e_{n_b}^T]^T \in \mathbb{R}^p,\ p = 6n_b\]+(1)¶\[q = [r_1^T e_1^T \dots r_{n_b}^T e_{n_b}^T]^T \in \mathbb{R}^p,\ p = 6n_b\]Where \(R\) is the set of real numbers and \(p\) is a variable representing the total number of generalized coordinates in the multibody system (i.e., each body has three variables for position and three for orientation).
In practice, quaternions (which have four variables) are typically used to describe orientation to avoid issues such as gimbal lock. If flexible bodies are present, deformation modes can be added to the position generalized coordinates.
Constrained mechanical systems have joints connecting bodies, which impose restrictions on the relative motion and result in constraints on the generalized coordinates. The kinematic constraints are formulated as algebraic expressions involving generalized coordinates:
-(2)¶\[\Phi(q, t) = [\Phi_1(q, t) \dots \Phi_m(q, t)]^T = 0\]+(2)¶\[\Phi(q, t) = [\Phi_1(q, t) \dots \Phi_m(q, t)]^T = 0\]where \(m\) represents the total number of independent constraint equations that the generalized coordinates must satisfy throughout the simulation. For simplicity, only holonomic constraints (i.e., position-dependent constraints) are considered in this section.
Taking the time derivative of the equation yields the velocity kinematic constraint equation:
-(3)¶\[\Phi_q(q, t)\dot{q} + \Phi_t(q, t) = 0\]+(3)¶\[\Phi_q(q, t)\dot{q} + \Phi_t(q, t) = 0\]Here, \(\dot{q}\) denotes generalized velocity, and the subscripts denote the partial derivatives: \(\Phi_q = \left[\frac{\partial \Phi_i}{\partial q_j}\right]\) and \(\Phi_t = \left[\frac{\partial \Phi}{\partial t}\right]\). Differentiating the equation with respect to time results in the acceleration kinematic constraint equation:
-(4)¶\[\Phi_q(q, t)\ddot{q} + (\Phi_q(q, t)\dot{q})q\dot{q} + 2\Phi_{qt}(q, t)\dot{q} + \Phi_{tt}(q, t) = 0\]+(4)¶\[\Phi_q(q, t)\ddot{q} + (\Phi_q(q, t)\dot{q})q\dot{q} + 2\Phi_{qt}(q, t)\dot{q} + \Phi_{tt}(q, t) = 0\]The time evolution of the mechanical system, governed by the Lagrange multiplier form of the constrained equations of motion, must satisfy the constraints at all times. The constrained equations of motion are given by:
-(5)¶\[M(q)\ddot{q} + \Phi_q^T(q)\lambda = Q(\dot{q}, q, t)\]+(5)¶\[M(q)\ddot{q} + \Phi_q^T(q)\lambda = Q(\dot{q}, q, t)\]
FAQs¶<
-Table of Contents
+Table of Contents
-
-
Previous topic
-Oscillating Surge Wave Energy Converter (OSWEC) - Verification
Next topic
-This Page
Quick search
Navigation
Contribution Guidelines — HydroChrono 0.1 documentation - - - - + + + + - - - - - + + + + + - - - - - + + + + +Navigation
Navigation
- @@ -165,15 +165,15 @@Contribution Guidelines¶
+Contribution Guidelines¶
- Introduction¶
+Introduction¶
Contributions to the HydroChrono project are highly valued and appreciated. This section outlines the guidelines and best practices to follow when contributing. We follow the Google C++ Style Guide; below are some of its main points.
- Google C++ Style Guide Highlights¶
+Google C++ Style Guide Highlights¶
Conclusion
-Table of Contents
+Table of Contents
Previous topic
-Next topic
-This Page
Quick search
Navigation
Source Code Documentation — HydroChrono 0.1 documentation - - - - + + + + - - - - - + + + + + - - - + + +Navigation
Navigation
- Source Code Documentation¶
+Source Code Documentation¶
- H5 Reader¶
+H5 Reader¶
h5fileinfo.h
This file provides methods to manipulate and extract data from HDF5 files.
- Some Helper Functions¶
+Some Helper Functions¶
helper.h
A collection of auxiliary functions that facilitate data manipulation and transformations.
- Hydrodynamic Modeling¶
+Hydrodynamic Modeling¶
hydro_forces.h
This file encompasses the main hydrodynamic calculations and algorithms.
- Wave Options¶
+Wave Options¶
wave_types.h
This source file includes various types of wave models, both regular and irregular.
- @@ -80,14 +80,14 @@Added Mass¶
+Added Mass¶
chloadaddedmass.h
Contains methods to include added mass in Chrono.
Added Mass
-diff --git a/_developer/source_code_overview.html b/_developer/source_code_overview.html index 9aa3744..23db0ba 100644 --- a/_developer/source_code_overview.html +++ b/_developer/source_code_overview.html @@ -8,40 +8,40 @@Table of Contents
+Table of Contents
-
-
Source Code Overview — HydroChrono 0.1 documentation - - - - + + + + - - - - - + + + + + - - - - - + + + + +Navigation
Navigation
- Source Code Overview¶
+Source Code Overview¶
- Introduction¶
+Introduction¶
Provide a brief overview of what this page is about.
- @@ -75,12 +75,12 @@Section 1: Topic Name¶
+Section 1: Topic Name¶
Description or content about this section.
- Sub-section 1.1¶
+Sub-section 1.1¶
Further details or subdivisions of Section 1.
Sub-section 1.1
Previous topic
-Next topic
-This Page
Quick search
Navigation
Building HydroChrono (and demos) — HydroChrono 0.1 documentation - - - - + + + + - - - - - + + + + + - - - - - + + + + +Navigation
Navigation
- Building HydroChrono (and demos)¶
+Building HydroChrono (and demos)¶
- Introduction¶
+Introduction¶
This page provides instructions on how to build HydroChrono and its associated demos.
- Preparation¶
-Ensure you have installed and built all required prerequisites. The exact versions listed in the prerequisites are essential for proper functionality.
+Preparation¶
+Ensure you have installed and built all required prerequisites. The exact versions listed in the prerequisites are essential for proper functionality.
- Building HydroChrono Library¶
+Building HydroChrono Library¶
Building HydroChrono Library -
Post-Build Steps¶
+Post-Build Steps¶
where \(M(q) \in \mathbb{R}^{p \times p}\) represents the generalized mass matrix, and \(Q(\dot{q}, q, t) \in \mathbb{R}^p\) denotes the action force acting on the generalized coordinates \(q \in \mathbb{R}^p\). The reaction force \(\Phi_q^T(q)\lambda\), where \(\lambda \in \mathbb{R}^m\) is the Lagrange multiplier associated with the kinematic constraints, results from the constraint equations. The combination of differential equations describing the system dynamics and algebraic equations describing the system’s constraints leads to the system being referred to as a differential-algebraic equation (DAE). Because the constraint equations are described at the position level, these DAEs are referred to as “index-3.”
The index-3 DAEs are neither linear nor ordinary differential. Hence, the Hilber-Hughes-Taylor (HHT) algorithm addresses these challenges by discretizing the equations of motion and enforcing position-level kinematic constraints. The core equation for the HHT integrator is:
-(6)¶\[\frac{1}{1+\alpha}(M\ddot{q})_{n+1} + (\Phi^T_q \lambda - Q)_{n+1} - \frac{\alpha}{1+\alpha}(\Phi^T_q \lambda - Q)_n) = 0\]+(6)¶\[\frac{1}{1+\alpha}(M\ddot{q})_{n+1} + (\Phi^T_q \lambda - Q)_{n+1} - \frac{\alpha}{1+\alpha}(\Phi^T_q \lambda - Q)_n) = 0\]The HHT algorithm iteratively solves the nonlinear equations for the unknowns using a Newton-like method, which eliminates ill-conditioning issues typically associated with integrating index-3 DAEs.
- Hydrodynamics theory in HydroChrono¶
-In order to integrate potential-flow-based hydrodynamics with Project Chrono, equation (5) needs to be modified to incorporate added mass on its left side and the hydrodynamic force functions (e.g., hydrostatics, radiation damping, wave excitation) on its right side. Importantly, constraints, which might emerge from various subsystems like joints, power take-offs, and ropes, remain unchanged when including hydrodynamics. The time-integration of the system’s equations of motion remains under Project Chrono’s purview, without any need for alterations. Indeed, Chrono is solving the complete Cummins’ equation.
-The equation (5) can be adapted to include the added mass and hydrodynamic forces as:
+Hydrodynamics theory in HydroChrono¶
+In order to integrate potential-flow-based hydrodynamics with Project Chrono, equation (5) needs to be modified to incorporate added mass on its left side and the hydrodynamic force functions (e.g., hydrostatics, radiation damping, wave excitation) on its right side. Importantly, constraints, which might emerge from various subsystems like joints, power take-offs, and ropes, remain unchanged when including hydrodynamics. The time-integration of the system’s equations of motion remains under Project Chrono’s purview, without any need for alterations. Indeed, Chrono is solving the complete Cummins’ equation.
+The equation (5) can be adapted to include the added mass and hydrodynamic forces as:
-(7)¶\[(M(q) + A)\ddot{q} + \Phi_q^T(q)\lambda = Q(\dot{q}, q, t) + F_{hydro}(\dot{q}, q, t)\]+(7)¶\[(M(q) + A)\ddot{q} + \Phi_q^T(q)\lambda = Q(\dot{q}, q, t) + F_{hydro}(\dot{q}, q, t)\]Where: - \(A \in \mathbb{R}^{p \times p}\) signifies the added mass matrix. - \(F_{hydro}(\dot{q}, q, t) \in \mathbb{R}^p\) represents the hydrodynamic force vector influencing the generalized coordinates \(q \in \mathbb{R}^p\).
The hydrodynamic force vector \(F_{hydro}(\dot{q}, q, t)\) can be broken down into three primary components: hydrostatic force \(F_{hs}(q)\), radiation damping force \(F_{rad}(\dot{q}, q)\), and wave excitation force \(F_{exc}(t)\). Thus, we have:
-(8)¶\[F_{hydro}(\dot{q}, q, t) = F_{hs}(q, t) + F_{rad}(\dot{q}, t) + F_{exc}(t)\]+(8)¶\[F_{hydro}(\dot{q}, q, t) = F_{hs}(q, t) + F_{rad}(\dot{q}, t) + F_{exc}(t)\]The subsequent sections provide an in-depth look into these components.
- Hydrostatic force, \(F_{hs}(q, t)\)¶
+Hydrostatic force, \(F_{hs}(q, t)\)¶
This force mirrors the restoring force due to buoyancy alongside alterations in the body’s waterplane area. It can be derived from the product of the hydrostatic stiffness matrix \(K_h\) and the displacement vector \(\Delta q\) - the difference between the system’s position \(q\) and its equilibrium position \(q_0\):
-(9)¶\[F_{hs}(q, t) = K_h \Delta q = K_h (q - q_0)\]-The hydrostatic stiffness matrix, \(K_h\), can be sourced by executing a numerical integration over the waterplane area of the floating body. Potential tools for this task include open-source boundary element method (BEM) tools like Capytaine [AD19], HAMS [jmse7030081], or the open-source mesh and hydrostatics package MeshMagick 1.
+(9)¶\[F_{hs}(q, t) = K_h \Delta q = K_h (q - q_0)\]The hydrostatic stiffness matrix, \(K_h\), can be sourced by executing a numerical integration over the waterplane area of the floating body. Potential tools for this task include open-source boundary element method (BEM) tools like Capytaine [AD19], HAMS [jmse7030081], or the open-source mesh and hydrostatics package MeshMagick 1.
- Radiation damping force, \(F_{rad}(\dot{q}, t)\)¶
+Radiation damping force, \(F_{rad}(\dot{q}, t)\)¶
This force stands as a representation of the energy dissipated when a floating body undergoes oscillation in water. It’s procured through a convolution integral between the radiation impulse response function \(K_{rad}(t)\) and the system’s velocity timeline \(\dot{q}(\tau)\):
-(10)¶\[F_{rad}(\dot{q}, t) = \int_{-\infty}^t K_{rad}(t - \tau) \dot{q}(\tau) d\tau\]+(10)¶\[F_{rad}(\dot{q}, t) = \int_{-\infty}^t K_{rad}(t - \tau) \dot{q}(\tau) d\tau\]The \(K_{rad}(t)\) function is derived by implementing the inverse continuous cosine transform (related to Fourier) on the frequency-domain radiation damping coefficients, \(B(\omega)\):
-(11)¶\[K_{rad}(t) = \frac{2}{\pi} \int_0^\infty B(\omega) \cos(\omega t) d\omega\]+(11)¶\[K_{rad}(t) = \frac{2}{\pi} \int_0^\infty B(\omega) \cos(\omega t) d\omega\]- About the Project
@@ -121,18 +121,18 @@