OpenFAST
Wind turbine multiphysics simulator
lineroutines.h
1 /****************************************************************
2  * Copyright (C) 2014 mdm *
3  * map[dot]plus[dot]plus[dot]help[at]gmail *
4  * *
5  * Licensed to the Apache Software Foundation (ASF) under one *
6  * or more contributor license agreements. See the NOTICE file *
7  * distributed with this work for additional information *
8  * regarding copyright ownership. The ASF licenses this file *
9  * to you under the Apache License, Version 2.0 (the *
10  * "License"); you may not use this file except in compliance *
11  * with the License. You may obtain a copy of the License at *
12  * *
13  * http://www.apache.org/licenses/LICENSE-2.0 *
14  * *
15  * Unless required by applicable law or agreed to in writing, *
16  * software distributed under the License is distributed on an *
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
18  * KIND, either express or implied. See the License for the *
19  * specific language governing permissions and limitations *
20  * under the License. *
21  ****************************************************************/
22 
23 
24 #ifndef _LINEROUTINES_H
25 #define _LINEROUTINES_H
26 
27 
28 #include "map.h"
29 
30 
34 MAP_ERROR_CODE increment_dof_by_delta(double* u_type, const double delta, const int size);
35 
36 
40 MAP_ERROR_CODE restore_original_displacement(double* u_ype, const double* initial_value, const int size);
41 
42 
46 MAP_ERROR_CODE reset_force_to_zero(double* fx, double* fy, double* fz, double* mx, double* my, double* mz, const int size);
47 
48 
52 MAP_ERROR_CODE set_force_minus(const double* in_force, double* force, const int size);
53 
54 
58 MAP_ERROR_CODE set_force_plus(const double* in_force, double* force, const int size);
59 
60 
64 MAP_ERROR_CODE update_outer_loop_inputs(double* input, MAP_ConstraintStateType_t* z_type, const int size, char* map_msg, MAP_ERROR_CODE* ierr);
65 
66 
70 MAP_ERROR_CODE update_outer_loop_residuals(double* residual, MAP_OtherStateType_t* other_type, const int size, char* map_msg, MAP_ERROR_CODE* ierr);
71 
72 
76 MAP_ERROR_CODE set_moment_minus(const MAP_OutputType_t* y_type, const Vessel* vessel, double* mx, double* my, double* mz, const int size);
77 
78 
79 MAP_ERROR_CODE set_moment_plus(const MAP_OutputType_t* y_type, const Vessel* vessel, double* mx, double* my, double* mz, const int size);
80 
81 
82 MAP_ERROR_CODE set_moment_minus_phi(const MAP_InputType_t* u_type, const MAP_OutputType_t* y_type, const Vessel* vessel, double* mx, double* my, double* mz, const double epsilon, const int size);
83 MAP_ERROR_CODE set_moment_plus_phi(const MAP_InputType_t* u_type, const MAP_OutputType_t* y_type, const Vessel* vessel, double* mx, double* my, double* mz, const double epsilon, const int size);
84 MAP_ERROR_CODE set_moment_minus_the(const MAP_InputType_t* u_type, const MAP_OutputType_t* y_type, const Vessel* vessel, double* mx, double* my, double* mz, const double epsilon, const int size);
85 MAP_ERROR_CODE set_moment_plus_the(const MAP_InputType_t* u_type, const MAP_OutputType_t* y_type, const Vessel* vessel, double* mx, double* my, double* mz, const double epsilon, const int size);
86 MAP_ERROR_CODE set_moment_minus_psi(const MAP_InputType_t* u_type, const MAP_OutputType_t* y_type, const Vessel* vessel, double* mx, double* my, double* mz, const double epsilon, const int size);
87 MAP_ERROR_CODE set_moment_plus_psi(const MAP_InputType_t* u_type, const MAP_OutputType_t* y_type, const Vessel* vessel, double* mx, double* my, double* mz, const double epsilon, const int size);
88 
89 
90 MAP_ERROR_CODE increment_phi_dof_by_delta(MAP_InputType_t* u_type, const Vessel* vessel, const double delta, const int size);
91 
92 
93 MAP_ERROR_CODE increment_the_dof_by_delta(MAP_InputType_t* u_type, const Vessel* vessel, const double delta, const int size);
94 
95 
96 MAP_ERROR_CODE increment_psi_dof_by_delta(MAP_InputType_t* u_type, const Vessel* vessel, const double delta, const int size);
97 
98 
99 MAP_ERROR_CODE f_op_sequence(MAP_OtherStateType_t* other_type, MAP_ParameterType_t* p_type, MAP_InputType_t* u_type, MAP_OutputType_t* y_type, MAP_ConstraintStateType_t* z_type, Fd* force, int size, char* map_msg, MAP_ERROR_CODE* ierr);
100 MAP_ERROR_CODE fd_x_sequence(MAP_OtherStateType_t* other_type, MAP_ParameterType_t* p_type, MAP_InputType_t* u_type, MAP_OutputType_t* y_type, MAP_ConstraintStateType_t* z_type, Fd* force, const double epsilon, const int size, const double* original_pos, char* map_msg, MAP_ERROR_CODE* ierr);
101 MAP_ERROR_CODE fd_y_sequence(MAP_OtherStateType_t* other_type, MAP_ParameterType_t* p_type, MAP_InputType_t* u_type, MAP_OutputType_t* y_type, MAP_ConstraintStateType_t* z_type, Fd* force, const double epsilon, const int size, const double* original_pos, char* map_msg, MAP_ERROR_CODE* ierr);
102 MAP_ERROR_CODE fd_z_sequence(MAP_OtherStateType_t* other_type, MAP_ParameterType_t* p_type, MAP_InputType_t* u_type, MAP_OutputType_t* y_type, MAP_ConstraintStateType_t* z_type, Fd* force, const double epsilon, const int size, const double* original_pos, char* map_msg, MAP_ERROR_CODE* ierr);
103 MAP_ERROR_CODE fd_phi_sequence(MAP_OtherStateType_t* other_type, MAP_ParameterType_t* p_type, MAP_InputType_t* u_type, MAP_OutputType_t* y_type, MAP_ConstraintStateType_t* z_type, Fd* force, const double epsilon, const int size, const double* original_x, const double* original_y, const double* original_z, char* map_msg, MAP_ERROR_CODE* ierr);
104 MAP_ERROR_CODE fd_the_sequence(MAP_OtherStateType_t* other_type, MAP_ParameterType_t* p_type, MAP_InputType_t* u_type, MAP_OutputType_t* y_type, MAP_ConstraintStateType_t* z_type, Fd* force, const double epsilon, const int size, const double* original_x, const double* original_y, const double* original_z, char* map_msg, MAP_ERROR_CODE* ierr);
105 MAP_ERROR_CODE fd_psi_sequence(MAP_OtherStateType_t* other_type, MAP_ParameterType_t* p_type, MAP_InputType_t* u_type, MAP_OutputType_t* y_type, MAP_ConstraintStateType_t* z_type, Fd* force, const double epsilon, const int size, const double* original_x, const double* original_y, const double* original_z, char* map_msg, MAP_ERROR_CODE* ierr);
106 MAP_ERROR_CODE calculate_stiffness(double* K, Fd* force, const double delta, const int size);
107 MAP_ERROR_CODE calculate_sumforce (double* F, Fd* force, const int size);
108 
112 MAP_ERROR_CODE set_line_variables_pre_solve(Domain* domain, char* map_msg, MAP_ERROR_CODE* ierr);
113 
114 
118 MAP_ERROR_CODE set_line_variables_post_solve(Domain* domain, char* map_msg, MAP_ERROR_CODE* ierr);
119 
120 double set_vertical_excursion(Line* line);
121 double set_horizontal_excursion(Line* line);
122 
123 
138 MAP_ERROR_CODE set_psi(Line* line, char* map_msg, MAP_ERROR_CODE* ierr);
139 
140 
141 MAP_ERROR_CODE reset_node_force_to_zero(Domain* domain, char* map_msg, MAP_ERROR_CODE* ierr);
142 
143 
153 MAP_ERROR_CODE set_line_initial_guess(Domain* domain, char* map_msg, MAP_ERROR_CODE* ierr);
154 
155 
156 MAP_ERROR_CODE solve_linear_spring_cable(Line* line, char* map_msg, MAP_ERROR_CODE* ierr);
157 
164 MAP_ERROR_CODE node_solve_sequence(Domain* domain, MAP_ParameterType_t* p_type, MAP_InputType_t* u_type, MAP_ConstraintStateType_t* z_type, MAP_OtherStateType_t* other_type, const float time, char* map_msg, MAP_ERROR_CODE* ierr);
165 
166 MAP_ERROR_CODE newton_solve_sequence(Domain* domain, MAP_ParameterType_t* p_type, MAP_InputType_t* u_type, MAP_ConstraintStateType_t* z_type, MAP_OtherStateType_t* other_type, const float time, char* map_msg, MAP_ERROR_CODE* ierr);
167 MAP_ERROR_CODE krylov_solve_sequence(Domain* domain, MAP_ParameterType_t* p_type, MAP_InputType_t* u_type, MAP_ConstraintStateType_t* z_type, MAP_OtherStateType_t* other_type, const float time, char* map_msg, MAP_ERROR_CODE* ierr);
168 
169 MAP_ERROR_CODE line_solve_sequence(Domain* domain, MAP_ParameterType_t* p_type, const float time, char* map_msg, MAP_ERROR_CODE* ierr);
170 MAP_ERROR_CODE solve_line(Domain* domain, const float time, char* map_msg, MAP_ERROR_CODE* ierr);
171 
172 
199 MAP_ERROR_CODE check_maximum_line_length(Line* line, const bool contact_flag, char* map_msg, MAP_ERROR_CODE* ierr);
200 
201 
205 MAP_ERROR_CODE calculate_node_sum_force(Domain* domain, MAP_ParameterType_t* p_type);
206 
207 
208 
212 void add_to_sum_fx(Node* node, const double fx);
213 
214 
218 void add_to_sum_fy(Node* node, const double fy);
219 
220 
224 void add_to_sum_fz(Node* node, const double fz);
225 
226 
227 #endif /* _LINEROUTINES_H */
Finite-difference structure.
Definition: map.h:96
Definition: MAP_Types.h:99
Definition: MAP_Types.h:92
Central point where all 'VESSEL' nodes can be displaced.
Definition: map.h:191
Definition: MAP_Types.h:73
Definition: map.h:312
Definition: map.h:266
Definition: MAP_Types.h:81
Definition: MAP_Types.h:54
Definition: map.h:433