107 lines
4.2 KiB
C++
107 lines
4.2 KiB
C++
#ifndef FESA_ELEMENTS_NONLINEAR_MITC4_INERTIA_H_
|
|
#define FESA_ELEMENTS_NONLINEAR_MITC4_INERTIA_H_
|
|
|
|
#include <array>
|
|
#include <string>
|
|
|
|
#include "fesa/core/status.h"
|
|
#include "fesa/elements/nonlinear_mitc4_shell.h"
|
|
#include "fesa/math/matrix.h"
|
|
#include "fesa/math/vector.h"
|
|
#include "fesa/math/vector3.h"
|
|
#include "fesa/model/model_types.h"
|
|
|
|
namespace fesa {
|
|
|
|
/// @brief Stores exact physical rotation-rate and drilling-null quantities.
|
|
struct DynamicRotationKinematics {
|
|
Vector3 director;
|
|
Vector3 drill_null;
|
|
Matrix null_gradient{3U, 3U};
|
|
/// @brief Stores D2 drill_null[velocity, velocity], without Dn[a].
|
|
Vector3 null_directional_second;
|
|
Vector3 angular_velocity;
|
|
Vector3 angular_acceleration;
|
|
/// @brief Stores director derivatives in fixed-global chart directions.
|
|
std::array<Vector3, 3> director_first;
|
|
std::array<std::array<Vector3, 3>, 3> director_second;
|
|
std::array<std::array<std::array<Vector3, 3>, 3>, 3> director_third;
|
|
};
|
|
|
|
/// @brief Evaluates exact finite-rotation rates and the unit drilling null.
|
|
/// @param phi Fixed-global principal-chart rotation coordinate.
|
|
/// @param initial_director Unit director at zero rotation.
|
|
/// @param velocity Fixed-chart rotation-coordinate rate.
|
|
/// @param acceleration Fixed-chart rotation-coordinate acceleration.
|
|
/// @return Finite director/rates/null derivatives or a structured failure.
|
|
[[nodiscard]] Result<DynamicRotationKinematics> EvaluateDynamicRotation(
|
|
const Vector3& phi, const Vector3& initial_director,
|
|
const Vector3& velocity, const Vector3& acceleration);
|
|
|
|
/// @brief Stores the consistent kinetic-inertia quantities at one trial.
|
|
struct NonlinearMitc4InertiaEvaluation {
|
|
Matrix mass;
|
|
Matrix position_tangent;
|
|
Matrix velocity_tangent;
|
|
Vector force;
|
|
Vector convective_force;
|
|
double kinetic_energy;
|
|
Vector3 momentum;
|
|
Vector3 angular_momentum;
|
|
Vector3 momentum_rate;
|
|
Vector3 angular_momentum_rate;
|
|
/// @brief Stores uncancelled quadrature norm sums for balance checks.
|
|
double momentum_rate_scale = 0.0;
|
|
double angular_momentum_rate_scale = 0.0;
|
|
};
|
|
|
|
/// @brief Evaluates finite-rotation consistent inertia for one MITC4 shell.
|
|
/// @note This object owns immutable reference geometry only, never analysis
|
|
/// trial state.
|
|
class NonlinearMitc4Inertia {
|
|
public:
|
|
/// @brief Creates a checked consistent kinetic-mass evaluator.
|
|
/// @param nodes Four non-owning nodes in source order.
|
|
/// @param initial_frames Fixed proper node frames in source order.
|
|
/// @param section Centered shell section with positive thickness.
|
|
/// @param material Shell material used to retain the nonlinear-shell input
|
|
/// contract.
|
|
/// @param density Reference mass density, strictly positive and finite.
|
|
/// @return A checked immutable evaluator or a structured model failure.
|
|
static Result<NonlinearMitc4Inertia> Create(
|
|
std::array<const Node*, 4> nodes,
|
|
std::array<ShellNodeInitialFrame, 4> initial_frames,
|
|
const ShellSection& section, const LinearElasticMaterial& material,
|
|
double density);
|
|
|
|
/// @brief Evaluates physical consistent inertia at a complete trial.
|
|
/// @param trial Fixed-global translation and rotation coordinates.
|
|
/// @param velocity24 Fixed-chart generalized physical velocity.
|
|
/// @param physical_acceleration24 Fixed-chart generalized physical
|
|
/// acceleration.
|
|
/// @return Current mass, inertia force and exact partial tangents, or a
|
|
/// fail-closed diagnostic.
|
|
[[nodiscard]] Result<NonlinearMitc4InertiaEvaluation> Evaluate(
|
|
const NonlinearMitc4TrialDofs& trial, const Vector& velocity24,
|
|
const Vector& physical_acceleration24) const;
|
|
|
|
private:
|
|
NonlinearMitc4Inertia(std::array<Vector3, 4> coordinates,
|
|
std::array<Matrix, 4> initial_frames,
|
|
std::array<Vector3, 4> initial_directors,
|
|
double thickness, double density,
|
|
SourceLocation source_location, std::string identity);
|
|
|
|
std::array<Vector3, 4> coordinates_;
|
|
std::array<Matrix, 4> initial_frames_;
|
|
std::array<Vector3, 4> initial_directors_;
|
|
double thickness_;
|
|
double density_;
|
|
SourceLocation source_location_;
|
|
std::string identity_;
|
|
};
|
|
|
|
} // namespace fesa
|
|
|
|
#endif // FESA_ELEMENTS_NONLINEAR_MITC4_INERTIA_H_
|