|
| 1 | +// This is free and unencumbered software released into the public domain. |
| 2 | +// For more information, please refer to <http://unlicense.org/> |
| 3 | + |
| 4 | +#ifndef OTLS_MODELS_SAGTENSION_LINECABLELOADERBASE_H_ |
| 5 | +#define OTLS_MODELS_SAGTENSION_LINECABLELOADERBASE_H_ |
| 6 | + |
| 7 | +#include <list> |
| 8 | + |
| 9 | +#include "models/base/error_message.h" |
| 10 | +#include "models/sagtension/cable_elongation_model.h" |
| 11 | +#include "models/sagtension/sag_tension_cable.h" |
| 12 | +#include "models/transmissionline/catenary.h" |
| 13 | +#include "models/transmissionline/line_cable.h" |
| 14 | + |
| 15 | +/// \par OVERVIEW |
| 16 | +/// |
| 17 | +/// This class sets up a LineCable for a sag-tension analysis. The process is |
| 18 | +/// as follows: |
| 19 | +/// - solve for a catenary based on the line cable constraint |
| 20 | +/// - solve cable model for the constraint |
| 21 | +/// - solve cable models for the stretch conditions |
| 22 | +/// - determine the stretch load for each condition |
| 23 | +/// |
| 24 | +/// \par STRETCH |
| 25 | +/// |
| 26 | +/// This class supports multiple forms of stretch, including: |
| 27 | +/// - short term, heavy load stretch |
| 28 | +/// - long term, creep stretch |
| 29 | +/// |
| 30 | +/// \par LINE CABLE GEOMETRY |
| 31 | +/// |
| 32 | +/// This class uses the ruling span geometry defined in the line cable. |
| 33 | +class LineCableLoaderBase { |
| 34 | + public: |
| 35 | + /// \brief Default constructor. |
| 36 | + LineCableLoaderBase(); |
| 37 | + |
| 38 | + /// \brief Destructor. |
| 39 | + ~LineCableLoaderBase(); |
| 40 | + |
| 41 | + /// \brief Gets the stretch state for the creep condition. |
| 42 | + /// \return The stretch state for the creep condition. |
| 43 | + CableStretchState StretchStateCreep() const; |
| 44 | + |
| 45 | + /// \brief Gets the stretch state for the load condition. |
| 46 | + /// \return The stretch state for the load condition. |
| 47 | + CableStretchState StretchStateLoad() const; |
| 48 | + |
| 49 | + /// \brief Validates member variables. |
| 50 | + /// \param[in] is_included_warnings |
| 51 | + /// A flag that tightens the acceptable value range. |
| 52 | + /// \param[in,out] messages |
| 53 | + /// A list of detailed error messages. If this is provided, any validation |
| 54 | + /// errors will be appended to the list. |
| 55 | + /// \return A boolean value indicating status of member variables. |
| 56 | + bool Validate(const bool& is_included_warnings = true, |
| 57 | + std::list<ErrorMessage>* messages = nullptr) const; |
| 58 | + |
| 59 | + /// \brief Gets the line cable. |
| 60 | + /// \return The line cable. |
| 61 | + const LineCable* line_cable() const; |
| 62 | + |
| 63 | + /// \brief Sets the line cable. |
| 64 | + /// \param[in] line_cable |
| 65 | + /// The line cable. |
| 66 | + void set_line_cable(const LineCable* line_cable); |
| 67 | + |
| 68 | + protected: |
| 69 | + /// \brief Initializes the models defined in the line cable. |
| 70 | + /// \return The success status of the update. |
| 71 | + /// This function initializes the cable models with the correct temperature |
| 72 | + /// and polynomial, but does not solve for any stretch. |
| 73 | + bool InitializeLineCableModels() const; |
| 74 | + |
| 75 | + /// \brief Determines if class is updated. |
| 76 | + /// \return A boolean indicating if class is updated. |
| 77 | + virtual bool IsUpdated() const; |
| 78 | + |
| 79 | + /// \brief Calculates the unit load of the catenary. |
| 80 | + /// \param[in] weathercase |
| 81 | + /// The weather case. |
| 82 | + /// \return The unit loading of the cable. |
| 83 | + Vector3d UnitLoad(const WeatherLoadCase& weathercase) const; |
| 84 | + |
| 85 | + /// \brief Updates cached member variables and modifies control variables if |
| 86 | + /// update is required. |
| 87 | + /// \return A boolean indicating if class updates completed successfully. |
| 88 | + virtual bool Update() const; |
| 89 | + |
| 90 | + /// \brief Updates the constraint cable model. |
| 91 | + /// \return The success status of the update. |
| 92 | + /// This function further updates the constraint cable model to include any |
| 93 | + /// stretch. |
| 94 | + bool UpdateConstraintCableModel() const; |
| 95 | + |
| 96 | + /// \brief Updates the constraint catenary. |
| 97 | + /// \return The success status of the update. |
| 98 | + bool UpdateConstraintCatenary() const; |
| 99 | + |
| 100 | + /// \brief Updates the stretch due to load and creep. |
| 101 | + /// \return The success status of the update. |
| 102 | + bool UpdateLoadStretch() const; |
| 103 | + |
| 104 | + /// \var cable_sagtension_ |
| 105 | + /// The cable, which is referenced for sag-tension methods. |
| 106 | + SagTensionCable cable_sagtension_; |
| 107 | + |
| 108 | + /// \var catenary_constraint_ |
| 109 | + /// The catenary for the line cable constraint. |
| 110 | + mutable Catenary3d catenary_constraint_; |
| 111 | + |
| 112 | + /// \var is_updated_catenary_constraint_ |
| 113 | + /// An indicator that tells if the constraint catenary cable is updated. |
| 114 | + mutable bool is_updated_catenary_constraint_; |
| 115 | + |
| 116 | + /// \var is_updated_stretch_ |
| 117 | + /// An indicator that tells if the stretch load is updated. |
| 118 | + mutable bool is_updated_stretch_; |
| 119 | + |
| 120 | + /// \var line_cable_ |
| 121 | + /// The line cable that is being reloaded. |
| 122 | + const LineCable* line_cable_; |
| 123 | + |
| 124 | + /// \var model_constraint_ |
| 125 | + /// The cable model for the constraint weathercase. This model may contain |
| 126 | + /// stretch, depending on the constraint condition. |
| 127 | + mutable CableElongationModel model_constraint_; |
| 128 | + |
| 129 | + /// \var model_creep_ |
| 130 | + /// The cable model used for solving creep stretch. This model will always |
| 131 | + /// contain zero stretch to ensure that only the polynomial is referenced. |
| 132 | + mutable CableElongationModel model_creep_; |
| 133 | + |
| 134 | + /// \var model_load_ |
| 135 | + /// The cable model used for solving heavy load stretch. This model will |
| 136 | + /// always contain zero stretch to ensure that only the polynomial is |
| 137 | + /// referenced. |
| 138 | + mutable CableElongationModel model_load_; |
| 139 | + |
| 140 | + /// \var state_stretch_creep_ |
| 141 | + /// The stretch state for the creep condition. |
| 142 | + mutable CableStretchState state_stretch_creep_; |
| 143 | + |
| 144 | + /// \var state_stretch_load_; |
| 145 | + /// The stretch state for the load condition. |
| 146 | + mutable CableStretchState state_stretch_load_; |
| 147 | +}; |
| 148 | + |
| 149 | +#endif // OTLS_MODELS_SAGTENSION_LINECABLELOADERBASE_H_ |
0 commit comments