OpenFAST
Wind turbine multiphysics simulator
|
This code implements the spatial mapping algorithms described in the following papers. More...
Data Types | |
type | maptype |
Type that describes characteristics of the mapping between two meshes. More... | |
type | meshmaplinearizationtype |
data structures (for linearization) containing jacobians of mapping between fields on different meshes More... | |
type | meshmaptype |
data structures to determine full mapping between fields on different meshes More... | |
Functions/Subroutines | |
subroutine, public | meshmapcreate (Src, Dest, MeshMap, ErrStat, ErrMsg) |
This subroutine takes two meshes, determines the sizes required for the mapping data structure, and then allocates the mappings (different for loads and motions/scalars). More... | |
subroutine, public | meshmapdestroy (MeshMap, ErrStat, ErrMsg) |
This routine destroys the elements of the MeshMapType. | |
subroutine, public | meshmapwrbin (UnIn, Src, Dest, MeshMap, ErrStat, ErrMsg, FileName) |
This creates a matrix to write to a binary file (for debugging) More... | |
subroutine, public | transfer_line2_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp) |
Routine for transfering data from Line2 mesh to Point Mesh. More... | |
subroutine, public | linearize_line2_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp) |
Routine for computing linearization matrices for data transfer from Line2 mesh to Point Mesh. More... | |
subroutine | formmatrix_fulllinearization (dM, M_A, M_SL_fm, M_SL_uSm, M_SL_li, ErrStat, ErrMsg) |
Routine that forms the final linearization matrices for of loads from line2 meshes to either line2 or point matrices. More... | |
subroutine | transfer_motions_line2_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg) |
Given a mapping, this routine transfers the motions from nodes on Line2 elements to nodes on another mesh. More... | |
subroutine | linearize_motions_line2_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg) |
Given a mapping, this routine transfers the motions from nodes on Line2 elements to nodes on another mesh. More... | |
subroutine | createmapping_projecttoline2 (Mesh1, Mesh2, NodeMap, Mesh1_TYPE, ErrStat, ErrMsg) |
This routine projects Mesh1 onto a Line2 mesh (Mesh2) to find the element mappings between the two meshes. More... | |
subroutine | create_pointmesh (Src, Temp_Point_Src, ErrStat, ErrMsg) |
This routine creates a new mesh with the same positions as the Src mesh, except all of the elements are points. More... | |
subroutine | createloadmap_l2_to_p (Src, Dest, MeshMap, ErrStat, ErrMsg) |
routine that creats a map of line2 loads to points More... | |
subroutine | createmotionmap_l2_to_p (Src, Dest, MeshMap, ErrStat, ErrMsg) |
routine that creats a map of line2 motions to points More... | |
subroutine, public | transfer_point_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp) |
Routine that transfers data from a point mesh to a line2 mesh. More... | |
subroutine, public | linearize_point_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp) |
Routine that creates linearization matricies for data tranfer from a point mesh to a line2 mesh. More... | |
subroutine | createloadmap_p_to_l2 (Src, Dest, MeshMap, ErrStat, ErrMsg) |
subroutine | createmotionmap_p_to_l2 (Src, Dest, MeshMap, ErrStat, ErrMsg) |
subroutine, public | transfer_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp) |
Given two point meshes, this routine transfers the source mesh values to the destination mesh using appropriate math. More... | |
subroutine | createmapping_nearestneighbor (Mesh1, Mesh2, NodeMap, Mesh1_TYPE, Mesh2_TYPE, ErrStat, ErrMsg) |
This routine creates the node-to-node (nearest neighbor). More... | |
subroutine | transfer_motions_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg) |
Given a nearest-neighbor mapping, this routine transfers motions between nodes on the mesh. More... | |
subroutine | linearize_motions_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg) |
Given a nearest-neighbor mapping, this routine forms the linearization matrices of motion transfer between nodes on the mesh. More... | |
subroutine | transfer_loads_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp, LoadsScaleFactor) |
Given a nearest-neighbor mapping, this routine transfers loads between point nodes on the meshes. More... | |
subroutine | linearize_loads_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp) |
Given a nearest-neighbor mapping, this routine generates the linearization matrices for loads transfer between point nodes on the meshes. More... | |
real(reki) function | getloadsscalefactor (Src) |
subroutine | createloadmap_p_to_p (Src, Dest, MeshMap, ErrStat, ErrMsg) |
subroutine | createmotionmap_p_to_p (Src, Dest, MeshMap, ErrStat, ErrMsg) |
subroutine, public | transfer_line2_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp) |
Routine that transfers data from a line2 mesh to another line2 mesh. More... | |
subroutine, public | linearize_line2_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp) |
Routine that computes the linearization matrices for data transfers from a mesh to a line2 mesh. More... | |
subroutine | transfer_loads_point_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp, LoadsScaleFactor) |
Given a mapping, this routine transfers the loads from nodes on a point-element mesh to nodes on another Line2 mesh. More... | |
subroutine | linearize_loads_point_to_line2 (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp) |
Given a mapping, this routine contains the linearization matrices of the load transfers from nodes on a point-element mesh to nodes on another Line2 mesh. More... | |
subroutine | convert_point_to_line2_loads (Dest, MeshMap, ErrStat, ErrMsg, DestDisp) |
This routine takes the lumped loads on nodes of a (line2) mesh and converts them to loads distributed across the line2 elements. More... | |
subroutine | linearize_convert_point_to_line2_loads (Dest, MeshMap, ErrStat, ErrMsg, DestDisp) |
This routine calculates the linearized matrices that convert the lumped (point) loads on nodes of a (line2) mesh to loads distributed across the line2 elements. More... | |
subroutine | create_augmented_ln2_src_mesh (Src, Dest, MeshMap, Dest_TYPE, ErrStat, ErrMsg) |
subroutine | transfer_src_to_augmented_ln2_src (Src, MeshMap, ErrStat, ErrMsg, SrcDisp, LoadsScaleFactor) |
This routine takes the loads from a line2 mesh and transfers them to an augmented line2 mesh (the src mesh with extra/augmented nodes). More... | |
subroutine | linearize_src_to_augmented_ln2_src (Src, MeshMap, ErrStat, ErrMsg, SrcDisp) |
This routine linearizes Transfer_Src_To_Augmented_Ln2_Src (modmesh_mapping::transfer_src_to_augmented_ln2_src). More... | |
subroutine | create_inverselumping_matrix (Dest, MeshMap, ErrStat, ErrMsg) |
This routine creates a matrix used to "unlump" loads later (needs to have element connectivity information to create it) More... | |
subroutine | createloadmap_l2_to_l2 (Src, Dest, MeshMap, ErrStat, ErrMsg) |
This subroutine creates the mapping from a line2 mesh with loads to another line2 mesh. More... | |
subroutine | createmotionmap_l2_to_l2 (Src, Dest, MeshMap, ErrStat, ErrMsg) |
This routine creates the mapping of motions between two meshes. More... | |
subroutine | lump_line2_to_point (Line2_Src, Point_Dest, ErrStat, ErrMsg, SrcDisp, LoadsScaleFactor) |
This subroutine takes a Line2 mesh (SRC) with distributed forces and/or moments and lumps those to the concentrated forces and/or moments at the endpoints (nodes) of the Line2 mesh. More... | |
subroutine | linearize_lump_line2_to_point (Line2_Src, Point_Dest, dM, ErrStat, ErrMsg) |
This subroutine linearizes the lumping of distributed loads to point loads. More... | |
subroutine | formmatrix_lump_line2_to_point (Mesh, dM, ErrStat, ErrMsg, DispMesh) |
subroutine, public | linearize_point_to_point (Src, Dest, MeshMap, ErrStat, ErrMsg, SrcDisp, DestDisp) |
This routine creates the linearization matrices for transfer of fields between point meshes. More... | |
subroutine, public | writemappingtransfertofile (Mesh1_I, Mesh1_O, Mesh2_I, Mesh2_O, Map_Mod1_Mod2, Map_Mod2_Mod1, BinOutputName) |
This routine is used for debugging mesh mappings. More... | |
subroutine, public | nwtc_library_copymaptype (SrcMapTypeData, DstMapTypeData, CtrlCode, ErrStat, ErrMsg) |
subroutine, public | nwtc_library_destroymaptype (MapTypeData, ErrStat, ErrMsg) |
subroutine, public | nwtc_library_packmaptype (ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMsg, SizeOnly) |
subroutine, public | nwtc_library_unpackmaptype (ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, ErrMsg) |
subroutine | nwtc_library_copymeshmaplinearizationtype (SrcMeshMapLinearizationTypeData, DstMeshMapLinearizationTypeData, CtrlCode, ErrStat, ErrMsg) |
subroutine | nwtc_library_destroymeshmaplinearizationtype (MeshMapLinearizationTypeData, ErrStat, ErrMsg) |
subroutine | nwtc_library_packmeshmaplinearizationtype (ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMsg, SizeOnly) |
subroutine | nwtc_library_unpackmeshmaplinearizationtype (ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, ErrMsg) |
subroutine, public | nwtc_library_copymeshmaptype (SrcMeshMapTypeData, DstMeshMapTypeData, CtrlCode, ErrStat, ErrMsg) |
subroutine, public | nwtc_library_destroymeshmaptype (MeshMapTypeData, ErrStat, ErrMsg) |
subroutine, public | nwtc_library_packmeshmaptype (ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMsg, SizeOnly) |
subroutine, public | nwtc_library_unpackmeshmaptype (ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, ErrMsg) |
Variables | |
integer(intki), parameter | node_not_mapped = -1 |
constant that indicates a node is not mapped | |
This code implements the spatial mapping algorithms described in the following papers.
|
private |
This routine takes the lumped loads on nodes of a (line2) mesh and converts them to loads distributed across the line2 elements.
[in,out] | dest | The mesh (on input, the nodal loads values are lumped; on output they are distributed along the element) |
[in] | destdisp | The mesh that contains the translation displacement for these loads |
[in,out] | meshmap | The mapping data |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
This routine creates a matrix used to "unlump" loads later (needs to have element connectivity information to create it)
[in] | dest | destination mesh |
[in,out] | meshmap | mesh mapping data |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
This routine creates a new mesh with the same positions as the Src mesh, except all of the elements are points.
It adds fields for forces, moments, and/or TranslationDisp, if they are part of the Src mesh.
[in] | src | The source mesh |
[in,out] | temp_point_src | A blank mesh to be created |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
This subroutine creates the mapping from a line2 mesh with loads to another line2 mesh.
[in] | src | The source mesh |
[in] | dest | The destination mesh |
[in,out] | meshmap | mapping data |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
routine that creats a map of line2 loads to points
[in] | src | The source mesh |
[in] | dest | The destination mesh |
[in,out] | meshmap | mapping structure |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
This routine creates the node-to-node (nearest neighbor).
We map FROM Mesh1 to Mesh2
[in] | mesh1 | The mesh in the outer mapping loop (Dest for Motions/Scalars; Src for Loads) |
[in] | mesh2 | The mesh in the inner mapping loop (Src for Motions/Scalars; Dest for Loads) |
[in,out] | nodemap | The mapping from Src to Dest |
[in] | mesh1_type | Type of Mesh1 elements to map |
[in] | mesh2_type | Type of Mesh2 elements on map |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
This routine projects Mesh1 onto a Line2 mesh (Mesh2) to find the element mappings between the two meshes.
[in] | mesh1 | The mesh in the outer mapping loop (Dest for Motions/Scalars; Src for Loads) |
[in] | mesh2 | The mesh in the inner mapping loop (Src for Motions/Scalars; Dest for Loads) |
[in,out] | nodemap | The mapping from Src to Dest |
[in] | mesh1_type | Type of Mesh1 elements to map |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
This routine creates the mapping of motions between two meshes.
[in] | src | The source mesh |
[in] | dest | The destination mesh |
[in,out] | meshmap | structure that contains data necessary to map these two meshes |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
routine that creats a map of line2 motions to points
[in] | src | The source mesh |
[in] | dest | The destination mesh |
[in,out] | meshmap | mapping data structure |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
Routine that forms the final linearization matrices for of loads from line2 meshes to either line2 or point matrices.
[in,out] | dm | linearization data type currently filled with values from point-to-point or point-to-line2 linearization |
[in,out] | m_a | linearization matrix for augmented source mesh |
[in,out] | m_sl_fm | linearization matrix for source-mesh lumped force component of moment |
[in,out] | m_sl_usm | linearization matrix for source-mesh lumped source translational displacement component of moment |
[in,out] | m_sl_li | linearization matrix for source-mesh lumped load "identity" component |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
Matrix \( M_{uSm} = \left[ M_{uSm}^D + M_{li}^D M_{uSm}^{SL} \right] M^A \).
Matrix \( M_{uDm} = M_{uDm}^D \)
Matrix \( M_{fm} = \left[ M_{fm}^D M_{li}^{SL} + M_{li}^D M_{fm}^{SL} \right] M^A \)
Matrix \( M_{li} = M_{li}^D M_{li}^{SL} M^A \)
|
private |
[in] | mesh | mesh that has loads being lumped |
[in] | dispmesh | mesh that has displaced position of Mesh |
[in,out] | dm | data structure for linearization |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
Matrix \( M_{uDm}^{L} \), stored in modmesh_mapping::meshmaplinearizationtype::m_ud, is allocated to be size Mesh%NNodes*3, Mesh%NNodes*3 (a square matrix). This is the block matrix that relates the destination translational displacement (u) to the lumped moment.
Matrix \( M_{fm}^{L} \), stored in modmesh_mapping::meshmaplinearizationtype::m_f, is allocated to be size Mesh%NNodes*3, Mesh%NNodes*3 (a square matrix). This is the block matrix that relates the force (f) to the lumped moment.
|
private |
[in] | src | The source mesh with loads fields allocated |
|
private |
This routine calculates the linearized matrices that convert the lumped (point) loads on nodes of a (line2) mesh to loads distributed across the line2 elements.
(i.e., inverse lumping)
[in] | dest | The mesh (on linearization input the loads are distributed along the line2 element) |
[in,out] | meshmap | The mapping data |
[in] | destdisp | The mesh that contains the translation displacement for these loads |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
Matrix \( \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} \), stored in modmesh_mapping::meshmaplinearizationtype::li, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the block matrix that maps the individual load fields of the source mesh to the corresponding field in the destination mesh. This matrix also forms part of the terms of modmesh_mapping::meshmaplinearizationtype::m_uS and modmesh_mapping::meshmaplinearizationtype::m_f.
However, since this is easier done with a solve, we are not actually going to form the matrix here.
Matrix \( M_{uDm}^{DLinv} = - \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{uDm}^{DL} \), stored in modmesh_mapping::meshmaplinearizationtype::m_us, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the block matrix that relates the destination translational displacement field to the moment field.
However, since this is easier done with a solve, we are not actually going to form the matrix here. Instead, I'll return \( M_{uDm}^{DL} \)
Matrix \( M_{fm}^{DLinv} = - \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{fm}^{DL} \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1}\), stored in modmesh_mapping::meshmaplinearizationtype::m_f, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the block matrix that relates the force field to the moment field.
However, since this is easier done with a solve, we are not actually going to form the matrix here. Instead, I'll return \( M_{fm}^{DL} \)
subroutine, public modmesh_mapping::linearize_line2_to_line2 | ( | type(meshtype), intent(in) | Src, |
type(meshtype), intent(in) | Dest, | ||
type(meshmaptype), intent(inout) | MeshMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
type(meshtype), intent(in), optional | SrcDisp, | ||
type(meshtype), intent(in), optional | DestDisp | ||
) |
Routine that computes the linearization matrices for data transfers from a mesh to a line2 mesh.
Mapping equations are as follows:
Rotational Displacement: \( \frac{\partial M_\Lambda}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \( \left\{ \vec{\theta}^S\right\}\)
Translational Displacement: \( \frac{\partial M_u}{\partial x} = \begin{bmatrix} M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^S \\ \vec{\theta}^S \end{matrix} \right\} \)
Rotational Velocity: \( \frac{\partial M_\omega}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\omega}^S\right\}\)
Translational Velocity: \( \frac{\partial M_v}{\partial x} = \begin{bmatrix} M_{tv\_uD} & M_{tv\_uS} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{v}^S \\ \vec{\omega}^S \end{matrix} \right\} \)
Rotational Acceleration: \( \frac{\partial M_\alpha}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\alpha}^S\right\}\)
Translational Acceleration: \( \frac{\partial M_a}{\partial x} = \begin{bmatrix} M_{ta\_uD} & M_{ta\_uS} & M_{ta\_rv} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{\omega}^S \\ \vec{a}^S \\ \vec{\alpha}^S \end{matrix} \right\} \)
Scalar quantities: \( \frac{\partial M_S}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{S}^S\right\}\)
Forces: \( \frac{\partial M_f}{\partial x} = \begin{bmatrix} M_{li} \end{bmatrix} \) for source fields \(\left\{\vec{f}^S\right\}\)
Moments: \( \frac{\partial M_m}{\partial x} = \begin{bmatrix} M_{uDm} & M_{uSm} & M_{fm} & M_{li} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{f}^S \\ \vec{m}^S \end{matrix} \right\} \)
\(M_{mi}\) is modmesh_mapping::meshmaplinearizationtype::mi
\(M_{f_{\times p}}\) is modmesh_mapping::meshmaplinearizationtype::fx_p
\(M_{tv\_uD}\) is modmesh_mapping::meshmaplinearizationtype::tv_uD
\(M_{tv\_uS}\) is modmesh_mapping::meshmaplinearizationtype::tv_uS
\(M_{ta\_uD}\) is modmesh_mapping::meshmaplinearizationtype::ta_uD
\(M_{ta\_uS}\) is modmesh_mapping::meshmaplinearizationtype::ta_uS
\(M_{ta\_rv}\) is modmesh_mapping::meshmaplinearizationtype::ta_rv
\(M_{li}\) is modmesh_mapping::meshmaplinearizationtype::li
\(M_{uSm}\) is modmesh_mapping::meshmaplinearizationtype::m_us
\(M_{uDm}\) is modmesh_mapping::meshmaplinearizationtype::m_ud
\(M_{fm}\) is modmesh_mapping::meshmaplinearizationtype::m_f
[in] | src | source Line2 mesh |
[in] | dest | destination mesh |
[in] | srcdisp | a "functional" sibling of the source mesh; Src contains loads and SrcDisp contains TranslationDisp and Orientation |
[in] | destdisp | a "functional" sibling of the destination mesh; Dest contains loads and DestDisp contains TranslationDisp and Orientation |
[in,out] | meshmap | mapping between Src and Dest meshes |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
subroutine, public modmesh_mapping::linearize_line2_to_point | ( | type(meshtype), intent(in) | Src, |
type(meshtype), intent(in) | Dest, | ||
type(meshmaptype), intent(inout) | MeshMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
type(meshtype), intent(in), optional | SrcDisp, | ||
type(meshtype), intent(in), optional | DestDisp | ||
) |
Routine for computing linearization matrices for data transfer from Line2 mesh to Point Mesh.
Mapping equations are as follows:
Rotational Displacement: \( \frac{\partial M_\Lambda}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \( \left\{ \vec{\theta}^S\right\}\)
Translational Displacement: \( \frac{\partial M_u}{\partial x} = \begin{bmatrix} M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^S \\ \vec{\theta}^S \end{matrix} \right\} \)
Rotational Velocity: \( \frac{\partial M_\omega}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\omega}^S\right\}\)
Translational Velocity: \( \frac{\partial M_v}{\partial x} = \begin{bmatrix} M_{tv\_uD} & M_{tv\_uS} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{v}^S \\ \vec{\omega}^S \end{matrix} \right\} \)
Rotational Acceleration: \( \frac{\partial M_\alpha}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\alpha}^S\right\}\)
Translational Acceleration: \( \frac{\partial M_a}{\partial x} = \begin{bmatrix} M_{ta\_uD} & M_{ta\_uS} & M_{ta\_rv} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{\omega}^S \\ \vec{a}^S \\ \vec{\alpha}^S \end{matrix} \right\} \)
Scalar quantities: \( \frac{\partial M_S}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{S}^S\right\}\)
Forces: \( \frac{\partial M_f}{\partial x} = \begin{bmatrix} M_{li} \end{bmatrix} \) for source fields \(\left\{\vec{f}^S\right\}\)
Moments: \( \frac{\partial M_m}{\partial x} = \begin{bmatrix} M_{uDm} & M_{uSm} & M_{fm} & M_{li} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{f}^S \\ \vec{m}^S \end{matrix} \right\} \)
\(M_{mi}\) is modmesh_mapping::meshmaplinearizationtype::mi
\(M_{f_{\times p}}\) is modmesh_mapping::meshmaplinearizationtype::fx_p
\(M_{tv\_uD}\) is modmesh_mapping::meshmaplinearizationtype::tv_uD
\(M_{tv\_uS}\) is modmesh_mapping::meshmaplinearizationtype::tv_uS
\(M_{ta\_uD}\) is modmesh_mapping::meshmaplinearizationtype::ta_uD
\(M_{ta\_uS}\) is modmesh_mapping::meshmaplinearizationtype::ta_uS
\(M_{ta\_rv}\) is modmesh_mapping::meshmaplinearizationtype::ta_rv
\(M_{li}\) is modmesh_mapping::meshmaplinearizationtype::li
\(M_{uSm}\) is modmesh_mapping::meshmaplinearizationtype::m_us
\(M_{uDm}\) is modmesh_mapping::meshmaplinearizationtype::m_ud
\(M_{fm}\) is modmesh_mapping::meshmaplinearizationtype::m_f
[in] | src | source Line2 mesh |
[in] | dest | destination mesh |
[in] | srcdisp | a "functional" sibling of the source mesh; Src contains loads and SrcDisp contains TranslationDisp and Orientation |
[in] | destdisp | a "functional" sibling of the destination mesh; Dest contains loads and DestDisp contains TranslationDisp and Orientation |
[in,out] | meshmap | mapping between Src and Dest meshes |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
Given a mapping, this routine contains the linearization matrices of the load transfers from nodes on a point-element mesh to nodes on another Line2 mesh.
At the end of this routine, the MeshMap data structure will contain the four matrices for loads transfer from a point to line2 mesh: \( M_{um}\), \( M_{tm}\), \(M_{fm}\), and \(M_{li}\), where
\begin{equation} \begin{aligned} \left\{ \begin{matrix} \Delta\vec{u}^D \\ \Delta\vec{\theta}^D \\ \Delta\vec{f}^D \\ \Delta\vec{m}^D \end{matrix} \right\} & = \begin{bmatrix} M_{mi} & M_{f_{\times p}} & 0 & 0 \\ 0 & M_{mi} & 0 & 0 \\ 0 & 0 & M_{li} & 0 \\ M_{um} & M_{tm} & M_{fm} & M_{li} \\ \end{bmatrix} \left\{ \begin{matrix} \Delta\vec{u}^S \\ \Delta\vec{\theta}^S \\ \Delta\vec{F}^S \\ \Delta\vec{M}^S \end{matrix} \right\} \\ & = \begin{bmatrix} I & 0 & 0 & 0 \\ 0 & I & 0 & 0 \\ 0 & 0 & \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} & 0 \\ -\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1}M_{um}^{DL} & 0 & -\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1}M_{fm}^{DL}\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} & \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} \\ \end{bmatrix} \begin{bmatrix} M_{mi} & M_{f_{\times p}} & 0 & 0 \\ 0 & M_{mi} & 0 & 0 \\ 0 & 0 & M_{li}^D & 0 \\ 0 & M_{tm}^D & M_{fm}^D & M_{li}^D \\ \end{bmatrix} \left\{ \begin{matrix} \Delta\vec{u}^S \\ \Delta\vec{\theta}^S \\ \Delta\vec{F}^S \\ \Delta\vec{M}^S \end{matrix} \right\} \end{aligned} \end{equation}
"S" refers to the source (point) mesh;"D" refers to the destination (line2) mesh; "DL" refers to the destination mesh with lumped (point) loads.
\(M_{li}\) is modmesh_mapping::meshmaplinearizationtype::li
\(M_{M_u}\) is modmesh_mapping::meshmaplinearizationtype::m_us
\(M_{M_t}\) is modmesh_mapping::meshmaplinearizationtype::m_ud
\(M_{M_f}\) is modmesh_mapping::meshmaplinearizationtype::m_f
[in] | src | The source (Line2) mesh with loads fields allocated |
[in] | dest | The destination mesh |
[in,out] | meshmap | The mapping data from Src to Dest |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
[in] | srcdisp | The source mesh's cooresponding position mesh |
[in] | destdisp | The destination mesh's cooresponding position mesh |
Start by determining how the point load is split based on its projected location in the mapped destination Line2 element. (This is like Linearize_Loads_Point_to_Point, except we need to loop on elements instead of nodes [because of nearest neighbor mapping routine])
Matrix \( M_{li}^D \), stored in li_D, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the matrix that maps each field of the source point mesh to another point mesh.
Matrix \( M_{uD}^D \), stored in muD_D, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the block matrix that maps the u (translational displacement) field of the destination mesh to the moment field of the destination mesh.
Matrix \( M_{uS}^D \), stored in muS_D, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the block matrix that maps the u (translational displacement) field of the source mesh to the moment field of the destination mesh.
Matrix \( M_{fm}^D \), stored in mf_D, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the block matrix that maps the force field of the source mesh to the moment field of the destination mesh.
Then we can obtain the matrices that convert the lumped loads on the dest (line2) mesh into distributed loads on the same mesh: For linearization analysis, we assume this destination mesh already contains the distributed loads (i.e., values at the operating point).
Finally, we multiply the matrices together and return the non-zero block matrices that remain.
Matrix \( M_{li} = \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{li}^{D} \), stored in modmesh_mapping::meshmaplinearizationtype::li, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the matrix that maps each field of the source mesh to an augmented mesh.
Note that we solve the equation \( M_{li}^{DL} M_{li} = M_{li}^{D} \) for \( M_{li} \).
Matrix \( M_{uSm} = -\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{uSm}^{DL} \) stored in modmesh_mapping::meshmaplinearizationtype::m_us, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the matrix that maps the source u (translational displacement) to the destination moment.
Note that we solve the equation \( M_{li}^{DL} M_{uSm} = M_{uSm}^{DL} \) for \( M_{uSm} \).
Matrix \( M_{uDm} = -\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{uDm}^{DL} + \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{uDm}^D \) stored in modmesh_mapping::meshmaplinearizationtype::m_ud, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the matrix that maps the destination u (translational displacement) to the destination moment.
Note that we solve the equation \( M_{li}^{DL} M_{uDm} = M_{uDm}^D - M_{uDm}^{DL} \) for \( M_{uDm} \).
Matrix \( M_{fm} \) is stored in modmesh_mapping::meshmaplinearizationtype::m_f and is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the matrix that maps the force to the moment.
\( \begin{aligned} M_{fm} & = - \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{fm}^{DL}\begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1}M_{li}^D + \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} M_{fm}^D \\ & = \begin{bmatrix} M_{li}^{DL} \end{bmatrix}^{-1} \left( - M_{fm}^{DL} M_{li} + M_{fm}^D \right) \end{aligned}\),
Note that we solve the equation \( M_{li}^{DL} M_{fm} = M_{fm}^D - M_{fm}^{DL} M_{li} \) for \( M_{fm} \).
|
private |
Given a nearest-neighbor mapping, this routine generates the linearization matrices for loads transfer between point nodes on the meshes.
[in] | src | The source mesh with loads fields allocated |
[in] | dest | The destination mesh |
[in] | srcdisp | A mesh that contains the displacements associated with the source mesh |
[in] | destdisp | A mesh that contains the displacements associated with the destination mesh |
[in,out] | meshmap | The mapping data structure (from Dest to Src) |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
Matrix \( M_{li}^D = M_{li} \), stored in modmesh_mapping::meshmaplinearizationtype::li, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the matrix that maps each field of the source mesh to an augmented mesh.
Matrix \( M_{uD}^D \), stored in modmesh_mapping::meshmaplinearizationtype::m_ud, is allocated to be size Dest%NNodes*3, Dest%NNodes*3. This is the block matrix that maps the destination translation displacement field of the source mesh to the moment field of the destination mesh.
Matrix \( M_{uS}^D \), stored in modmesh_mapping::meshmaplinearizationtype::m_us, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the block matrix that maps the source translation displacement field of the source mesh to the moment field of the destination mesh.
Matrix \( M_{fm}^D \), stored in modmesh_mapping::meshmaplinearizationtype::m_f, is allocated to be size Dest%NNodes*3, Src%NNodes*3. This is the block matrix that maps the force field of the source mesh to the moment field of the destination mesh.
|
private |
This subroutine linearizes the lumping of distributed loads to point loads.
[in] | line2_src | line2 source mesh |
[in,out] | point_dest | point destination mesh |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
[in,out] | dm | data structure for linearization |
Matrix \( M_{li}^{SL} \), stored in modmesh_mapping::meshmaplinearizationtype::li, is allocated to be size Point_Dest%NNodes*3, Line2_Src%NNodes*3 (a square matrix). This is the block matrix that maps each field of the distributed source mesh to its identical field on the point (lumped) mesh. (i.e., force component of force; moment component of moment).
Matrix \( M_{um}^{SL} \), stored in modmesh_mapping::meshmaplinearizationtype::m_ud, is allocated to be size Point_Dest%NNodes*3, Line2_Src%NNodes*3 (a square matrix). This is the block matrix that relates the translational displacement (u) to the lumped moment.
Note this could be considered either m_ud or m_us, depending on context.
Matrix \( M_{fm}^{SL} \), stored in modmesh_mapping::meshmaplinearizationtype::m_f, is allocated to be size Point_Dest%NNodes*3, Line2_Src%NNodes*3 (a square matrix). This is the block matrix that relates the force (f) to the lumped moment.
We also transfer the force to the destination mesh so that we can use these values for creating the appropriate matrices later
|
private |
Given a mapping, this routine transfers the motions from nodes on Line2 elements to nodes on another mesh.
[in] | src | The source (Line2) mesh with motion fields allocated |
[in] | dest | The destination mesh |
[in,out] | meshmap | The mapping data |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
Given a nearest-neighbor mapping, this routine forms the linearization matrices of motion transfer between nodes on the mesh.
[in] | src | The source mesh with motion fields allocated |
[in] | dest | The destination mesh |
[in,out] | meshmap | data for the mesh mapping |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
subroutine, public modmesh_mapping::linearize_point_to_line2 | ( | type(meshtype), intent(in) | Src, |
type(meshtype), intent(in) | Dest, | ||
type(meshmaptype), intent(inout) | MeshMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
type(meshtype), intent(in), optional | SrcDisp, | ||
type(meshtype), intent(in), optional | DestDisp | ||
) |
Routine that creates linearization matricies for data tranfer from a point mesh to a line2 mesh.
Mapping equations are as follows:
Rotational Displacement: \( \frac{\partial M_\Lambda}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \( \left\{ \vec{\theta}^S\right\}\)
Translational Displacement: \( \frac{\partial M_u}{\partial x} = \begin{bmatrix} M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^S \\ \vec{\theta}^S \end{matrix} \right\} \)
Rotational Velocity: \( \frac{\partial M_\omega}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\omega}^S\right\}\)
Translational Velocity: \( \frac{\partial M_v}{\partial x} = \begin{bmatrix} M_{tv\_uD} & M_{tv\_uS} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{v}^S \\ \vec{\omega}^S \end{matrix} \right\} \)
Rotational Acceleration: \( \frac{\partial M_\alpha}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\alpha}^S\right\}\)
Translational Acceleration: \( \frac{\partial M_a}{\partial x} = \begin{bmatrix} M_{ta\_uD} & M_{ta\_uS} & M_{ta\_rv} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{\omega}^S \\ \vec{a}^S \\ \vec{\alpha}^S \end{matrix} \right\} \)
Scalar quantities: \( \frac{\partial M_S}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{S}^S\right\}\)
Forces: \( \frac{\partial M_F}{\partial x} = \begin{bmatrix} M_{li} \end{bmatrix} \) for source fields \(\left\{\vec{F}^S\right\}\)
Moments: \( \frac{\partial M_M}{\partial x} = \begin{bmatrix} M_{uDm} & M_{uSm} & M_{fm} & M_{li} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{F}^S \\ \vec{M}^S \end{matrix} \right\} \)
\(M_{mi}\) is modmesh_mapping::meshmaplinearizationtype::mi
\(M_{f_{\times p}}\) is modmesh_mapping::meshmaplinearizationtype::fx_p
\(M_{tv\_uD}\) is modmesh_mapping::meshmaplinearizationtype::tv_uD
\(M_{tv\_uS}\) is modmesh_mapping::meshmaplinearizationtype::tv_uS
\(M_{ta\_uD}\) is modmesh_mapping::meshmaplinearizationtype::ta_uD
\(M_{ta\_uS}\) is modmesh_mapping::meshmaplinearizationtype::ta_uS
\(M_{ta\_rv}\) is modmesh_mapping::meshmaplinearizationtype::ta_rv
\(M_{li}\) is modmesh_mapping::meshmaplinearizationtype::li
\(M_{uSm}\) is modmesh_mapping::meshmaplinearizationtype::m_us
\(M_{uDm}\) is modmesh_mapping::meshmaplinearizationtype::m_ud
\(M_{fm}\) is modmesh_mapping::meshmaplinearizationtype::m_f
[in] | src | source point mesh |
[in] | dest | destination mesh |
[in] | srcdisp | an optional mesh, which contains the displacements associated with the source if the source contains load information |
[in] | destdisp | an optional mesh, which contains the displacements associated with the destination if the destination contains load information |
[in,out] | meshmap | Mapping(s) between Src and Dest meshes; also contains jacobian of this mapping |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
subroutine, public modmesh_mapping::linearize_point_to_point | ( | type(meshtype), intent(in) | Src, |
type(meshtype), intent(in) | Dest, | ||
type(meshmaptype), intent(inout) | MeshMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
type(meshtype), intent(in), optional | SrcDisp, | ||
type(meshtype), intent(in), optional | DestDisp | ||
) |
This routine creates the linearization matrices for transfer of fields between point meshes.
Mapping equations are as follows:
Rotational Displacement: \( \frac{\partial M_\Lambda}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \( \left\{ \vec{\theta}^S\right\}\)
Translational Displacement: \( \frac{\partial M_u}{\partial x} = \begin{bmatrix} M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^S \\ \vec{\theta}^S \end{matrix} \right\} \)
Rotational Velocity: \( \frac{\partial M_\omega}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\omega}^S\right\}\)
Translational Velocity: \( \frac{\partial M_v}{\partial x} = \begin{bmatrix} M_{tv\_uD} & M_{tv\_uS} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{v}^S \\ \vec{\omega}^S \end{matrix} \right\} \)
Rotational Acceleration: \( \frac{\partial M_\alpha}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{\alpha}^S\right\}\)
Translational Acceleration: \( \frac{\partial M_a}{\partial x} = \begin{bmatrix} M_{ta\_uD} & M_{ta\_uS} & M_{ta\_rv} & M_{mi} & M_{f_{\times p}} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{\omega}^S \\ \vec{a}^S \\ \vec{\alpha}^S \end{matrix} \right\} \)
Scalar quantities: \( \frac{\partial M_S}{\partial x} = \begin{bmatrix} M_{mi} \end{bmatrix} \) for source fields \(\left\{\vec{S}^S\right\}\)
Forces: \( \frac{\partial M_F}{\partial x} = \begin{bmatrix} M_{li} \end{bmatrix} \) for source fields \(\left\{\vec{F}^S\right\}\)
Moments: \( \frac{\partial M_M}{\partial x} = \begin{bmatrix} M_{uDm} & M_{uSm} & M_{fm} & M_{li} \end{bmatrix} \) for source fields \( \left\{ \begin{matrix} \vec{u}^D \\ \vec{u}^S \\ \vec{F}^S \\ \vec{M}^S \end{matrix} \right\} \)
\(M_{mi}\) is modmesh_mapping::meshmaplinearizationtype::mi
\(M_{f_{\times p}}\) is modmesh_mapping::meshmaplinearizationtype::fx_p
\(M_{tv\_uD}\) is modmesh_mapping::meshmaplinearizationtype::tv_uD
\(M_{tv\_uS}\) is modmesh_mapping::meshmaplinearizationtype::tv_uS
\(M_{ta\_uD}\) is modmesh_mapping::meshmaplinearizationtype::ta_uD
\(M_{ta\_uS}\) is modmesh_mapping::meshmaplinearizationtype::ta_uS
\(M_{ta\_rv}\) is modmesh_mapping::meshmaplinearizationtype::ta_rv
\(M_{li}\) is modmesh_mapping::meshmaplinearizationtype::li
\(M_{uSm}\) is modmesh_mapping::meshmaplinearizationtype::m_us
\(M_{uDm}\) is modmesh_mapping::meshmaplinearizationtype::m_ud
\(M_{fm}\) is modmesh_mapping::meshmaplinearizationtype::m_f
[in] | src | source point mesh |
[in] | dest | destination mesh |
[in] | srcdisp | an optional mesh, which contains the displacements associated with the source if the source contains load information |
[in] | destdisp | an optional mesh, which contains the displacements associated with the destination if the destination contains load information |
[in,out] | meshmap | Mapping(s) between Src and Dest meshes; also contains jacobian of this mapping |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
This routine linearizes Transfer_Src_To_Augmented_Ln2_Src (modmesh_mapping::transfer_src_to_augmented_ln2_src).
[in] | src | The source mesh containing line2 loads |
[in,out] | meshmap | mesh mapping data, including the augmented source mesh |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
[in] | srcdisp | The displacements associated with the source mesh |
Matrix \( M_{li}^A = M_{mi}^A = M^A \), stored in modmesh_mapping::meshmaplinearizationtype::li, is allocated to be size MeshMap%Augmented_Ln2_Src%NNodes*3, Src%NNodes*3. This is the matrix that maps each field of the source mesh to an augmented mesh.
We need the distributed forces on the augmented mesh, so we transfer them in the linearization, too. Note that this is done without the LoadsScaleFactor.
|
private |
This subroutine takes a Line2 mesh (SRC) with distributed forces and/or moments and lumps those to the concentrated forces and/or moments at the endpoints (nodes) of the Line2 mesh.
These are placed in a Point mesh (DEST) where the Points are assumed to be colocated with the nodes of the Line2 Mesh.
This routine is expected to be used in the transfer of HydroDyn Output (distributed force/moment) to the SubDyn Input (concentrated force/moment); routine is to be called from the Input_Ouput routine for HydroDyn to SubDyn.
Formulation: Distrbuted quantities are integrated over the element with two-point nodal (Gauss-Lobatto) quadrature.
F(x_j) = int_{-1}^{1} f(xi) phi_j(xi) J dxi (exact)
F(x_1) =~ f(-1) phi_1(-1) J w_1 + f(+1) phi_1(+1) J w_2 (two-point quadrature) F(x_2) =~ f(-1) phi_2(-1) J w_1 + f(+1) phi_2(+1) J w_2 (two-point quadrature)
which can be simplified to
F(x_1) =~ f(-1) J F(x_2) =~ f(+1) J
since w_1 = w_2 = 1, phi_j(xi_i) = Delta_{j,i} (Kronecker Delta)
where x_j is the jth node in 3D physical coordinates, xi_i is the ith node in 1D element coordinates, j in {1,2}, xi in [-1,1] is the element natural coordinate, f(xi) is the distributed quantity, phi_j(xi) is the basis function for the jth node, J is the determinant of the Jacobian in the mapping from [X_1,X_2] to [-1,1] (X_j is the 3D location of the jth point)
For Line2 elements, J = DIST(X_1,X_2) / 2
[in] | line2_src | line2 source mesh |
[in,out] | point_dest | point destination mesh |
[in] | srcdisp | Another mesh that may contain the source's TranslationDisp field |
[in] | loadsscalefactor | Scaling factor for loads (to help with numerical issues) |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
subroutine, public modmesh_mapping::meshmapcreate | ( | type(meshtype), intent(in) | Src, |
type(meshtype), intent(in) | Dest, | ||
type(meshmaptype), intent(inout) | MeshMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg | ||
) |
This subroutine takes two meshes, determines the sizes required for the mapping data structure, and then allocates the mappings (different for loads and motions/scalars).
[in] | src | source mesh |
[in] | dest | destination mesh |
[in,out] | meshmap | mapping data structure |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
subroutine, public modmesh_mapping::meshmapwrbin | ( | integer, intent(inout) | UnIn, |
type(meshtype), intent(in) | Src, | ||
type(meshtype), intent(in) | Dest, | ||
type(meshmaptype), intent(in) | MeshMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
character(*), intent(in), optional | FileName | ||
) |
This creates a matrix to write to a binary file (for debugging)
[in,out] | unin | fortran output unit |
[in] | src | source mesh |
[in] | dest | destination mesh |
[in] | meshmap | mapping data structure |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
[in] | filename | Name of the file to write the output in |
subroutine, public modmesh_mapping::transfer_line2_to_line2 | ( | type(meshtype), intent(in) | Src, |
type(meshtype), intent(inout) | Dest, | ||
type(meshmaptype), intent(inout) | MeshMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
type(meshtype), intent(in), optional | SrcDisp, | ||
type(meshtype), intent(in), optional | DestDisp | ||
) |
Routine that transfers data from a line2 mesh to another line2 mesh.
[in] | src | source Line2 mesh |
[in,out] | dest | destination Line2 mesh |
[in] | srcdisp | a "functional" sibling of the source mesh; Src contains loads and SrcDisp contains TranslationDisp and Orientation |
[in] | destdisp | a "functional" sibling of the destination mesh; Dest contains loads and DestDisp contains TranslationDisp and Orientation |
[in,out] | meshmap | mapping between Src and Dest meshes |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
subroutine, public modmesh_mapping::transfer_line2_to_point | ( | type(meshtype), intent(in) | Src, |
type(meshtype), intent(inout) | Dest, | ||
type(meshmaptype), intent(inout) | MeshMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
type(meshtype), intent(in), optional | SrcDisp, | ||
type(meshtype), intent(in), optional | DestDisp | ||
) |
Routine for transfering data from Line2 mesh to Point Mesh.
[in] | src | source mesh |
[in,out] | dest | destination mesh |
[in] | srcdisp | a "functional" sibling of the source mesh required for loads transfer; Src contains loads and SrcDisp contains TranslationDisp and Orientation |
[in] | destdisp | a "functional" sibling of the destination mesh required for loads transfer; Dest contains loads and DestDisp contains TranslationDisp and Orientation |
[in,out] | meshmap | mapping data structure |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
|
private |
Given a mapping, this routine transfers the loads from nodes on a point-element mesh to nodes on another Line2 mesh.
[in] | src | The source (Line2) mesh with loads fields allocated |
[in,out] | dest | The destination mesh |
[in,out] | meshmap | The mapping data |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
[in] | srcdisp | The source mesh's cooresponding position mesh |
[in] | destdisp | The destination mesh's cooresponding position mesh |
[in] | loadsscalefactor | Scaling factor for loads (to help with numerical issues) |
Start with transferring the loads like point-to-point (except split between two nodes of the dest element).
now we can convert the lumped loads on the dest (line2) mesh into distributed loads on the same mesh:
|
private |
Given a nearest-neighbor mapping, this routine transfers loads between point nodes on the meshes.
[in] | src | The source mesh with loads fields allocated |
[in,out] | dest | The destination mesh |
[in] | srcdisp | A mesh that contains the displacements associated with the source mesh |
[in] | destdisp | A mesh that contains the displacements associated with the destination mesh |
[in,out] | meshmap | The mapping data structure (from Dest to Src) |
[in] | loadsscalefactor | Scaling factor for loads (to help with numerical issues) |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
Force: \(\vec{F}^D = \sum\limits_{eS} \vec{F}^S \)
Moment: \(\vec{M}^D = \sum\limits_{eS} \left\{ \vec{M}^S + \left\{ \left\{ \vec{p}^{OSR} + \vec{u}^S \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{F}^S \right\}\)
|
private |
Given a mapping, this routine transfers the motions from nodes on Line2 elements to nodes on another mesh.
[in] | src | The source (Line2) mesh with motion fields allocated |
[in,out] | dest | The destination mesh |
[in,out] | meshmap | The mapping data |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
Define \( \phi_1 = 1-\bar{l}^S \) and \( \phi_2 = \bar{l}^S \).
Translational Displacement: \(\vec{u}^D = \sum\limits_{i=1}^{2}\left( \vec{u}^S_{eSn_i} + \left[\left[\theta^S_{eSn_i}\right]^T \theta^{SR}_{eSn_i} - I\right]\left\{\vec{p}^{ODR}-\vec{p}^{OSR}_{eSn_i}\right\} \right) \phi_i\)
Orientation: \(\theta^D = \Lambda\left( \sum\limits_{i=1}^{2} \log\left( \theta^{DR}\left[\theta^{SR}_{eSn_i}\right]^T\theta^S_{eSn_i} \right) \phi_i \right)\) where \(\log()\) is nwtc_num::dcm_logmap and \(\Lambda()\) is nwtc_num::dcm_exp
Translational Velocity: \(\vec{v}^D = \sum\limits_{i=1}^{2}\left( \vec{v}^S_{eSn_i} + \left\{ \left\{ \vec{p}^{OSR}_{eSn_i} + \vec{u}^S_{eSn_i} \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\omega}^S_{eSn_i} \right) \phi_i\)
Rotational Velocity: \(\vec{\omega}^D = \sum\limits_{i=1}^{2} \vec{\omega}^S_{eSn_i} \phi_i\)
Translational Acceleration: \(\vec{a}^D = \sum\limits_{i=1}^{2}\left( \vec{a}^S_{eSn_i} + \left\{ \left\{ \vec{p}^{OSR}_{eSn_i} + \vec{u}^S_{eSn_i} \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\alpha}^S_{eSn_i} + \vec{\omega}^S_{eSn_i} \times \left\{ \left\{ \left\{ \vec{p}^{OSR}_{eSn_i} + \vec{u}^S_{eSn_i} \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\omega}^S_{eSn_i} \right\} \right) \phi_i\)
Rotational Acceleration: \(\vec{\alpha}^D = \sum\limits_{i=1}^{2} \vec{\alpha}^S_{eSn_i} \phi_i\)
Scalar: \(S^D = \sum\limits_{i=1}^{2} S^S_{eSn_i} \phi_i\)
|
private |
Given a nearest-neighbor mapping, this routine transfers motions between nodes on the mesh.
[in] | src | The source mesh with motion fields allocated |
[in,out] | dest | The destination mesh |
[in,out] | meshmap | data for the mesh mapping |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
Translational Displacement: \(\vec{u}^D = \vec{u}^S + \left[\left[\theta^S\right]^T \theta^{SR} - I\right]\left\{\vec{p}^{ODR}-\vec{p}^{OSR}\right\}\)
Orientation: \(\theta^D = \theta^{DR}\left[\theta^{SR}\right]^T\theta^S\)
Translational Velocity: \(\vec{v}^D = \vec{v}^S + \left\{ \left\{ \vec{p}^{OSR} + \vec{u}^S \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\omega}^S\)
Rotational Velocity: \(\vec{\omega}^D = \vec{\omega}^S\)
Translational Acceleration: \(\vec{a}^D = \vec{a}^S + \left\{ \left\{ \vec{p}^{OSR} + \vec{u}^S \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\alpha}^S + \vec{\omega}^S \times \left\{ \left\{ \left\{ \vec{p}^{OSR} + \vec{u}^S \right\} - \left\{ \vec{p}^{ODR} + \vec{u}^D \right\} \right\} \times \vec{\omega}^S \right\} \)
Rotational Acceleration: \(\vec{\alpha}^D = \vec{\alpha}^S\)
Scalars: \(S^D = S^S\)
subroutine, public modmesh_mapping::transfer_point_to_line2 | ( | type(meshtype), intent(in) | Src, |
type(meshtype), intent(inout) | Dest, | ||
type(meshmaptype), intent(inout) | MeshMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
type(meshtype), intent(in), optional | SrcDisp, | ||
type(meshtype), intent(in), optional | DestDisp | ||
) |
Routine that transfers data from a point mesh to a line2 mesh.
[in] | src | source (point) mesh |
[in,out] | dest | destination (line2) mesh |
[in,out] | meshmap | mapping data structure |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
[in] | srcdisp | a "functional" sibling of the source mesh for load mapping; Src contains loads and SrcDisp contains TranslationDisp and Orientation |
[in] | destdisp | a "functional" sibling of the destination mesh for load mapping; Dest contains loads and DestDisp contains TranslationDisp and Orientation |
subroutine, public modmesh_mapping::transfer_point_to_point | ( | type(meshtype), intent(in) | Src, |
type(meshtype), intent(inout) | Dest, | ||
type(meshmaptype), intent(inout) | MeshMap, | ||
integer(intki), intent(out) | ErrStat, | ||
character(*), intent(out) | ErrMsg, | ||
type(meshtype), intent(in), optional | SrcDisp, | ||
type(meshtype), intent(in), optional | DestDisp | ||
) |
Given two point meshes, this routine transfers the source mesh values to the destination mesh using appropriate math.
[in] | src | source point mesh |
[in,out] | dest | destination point mesh |
[in] | srcdisp | an optional mesh, which contains the displacements associated with the source if the source contains load information |
[in] | destdisp | an optional mesh, which contains the displacements associated with the destination if the destination contains load information |
[in,out] | meshmap | Mapping(s) between Src and Dest meshes |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
If Src is displacements/velocities then loop over the Destination Mesh; each motion/scalar in the destination mesh needs to be interpolated from the source mesh.
IF Src is forces and/or moments, loop over Src Mesh; each load in the source mesh needs to be placed somewhere in the destination mesh.
|
private |
This routine takes the loads from a line2 mesh and transfers them to an augmented line2 mesh (the src mesh with extra/augmented nodes).
It also transfers the translation displacement field to this augmented mesh so that we have only one mesh to deal with instead of two. The first NNodes values of the two meshes are equal, and the additional, augmented nodes are split between nodes on a line2 element.
[in] | src | The source mesh containing line2 loads |
[in,out] | meshmap | mesh mapping data, including the augmented source mesh |
[out] | errstat | Error status of the operation |
[out] | errmsg | Error message if ErrStat /= ErrID_None |
[in] | srcdisp | The displacements associated with the source mesh |
[in] | loadsscalefactor | Scaling factor for loads (to help with numerical issues) |
subroutine, public modmesh_mapping::writemappingtransfertofile | ( | type(meshtype), intent(in) | Mesh1_I, |
type(meshtype), intent(in) | Mesh1_O, | ||
type(meshtype), intent(in) | Mesh2_I, | ||
type(meshtype), intent(in) | Mesh2_O, | ||
type(meshmaptype), intent(in) | Map_Mod1_Mod2, | ||
type(meshmaptype), intent(in) | Map_Mod2_Mod1, | ||
character(*), intent(in) | BinOutputName | ||
) |
This routine is used for debugging mesh mappings.
It checks to see that the sum of the loads on each mesh is the same as when all the loads from each mesh are lumped to a single point.
[in] | mesh1_i | mesh 1 inputs |
[in] | mesh1_o | mesh 1 outputs |
[in] | mesh2_i | mesh 2 inputs |
[in] | mesh2_o | mesh 2 outputs |
[in] | map_mod1_mod2 | Data for mapping meshes from mesh 1 (outputs) to mesh 2 (inputs) |
[in] | map_mod2_mod1 | Data for mapping meshes from mesh 2 (outputs) to mesh 1 (inputs) |
[in] | binoutputname | name of binary output file |