feat: add thermal semantic domain model

This commit is contained in:
KOKO\Mimi
2026-09-29 18:33:44 +09:00
parent e6fd9e9e6b
commit 254247efc1
11 changed files with 755 additions and 2 deletions
+26
View File
@@ -183,6 +183,30 @@ class Domain {
const DomainCollectionView<LinearElasticMaterial>& LinearElasticMaterials()
const noexcept;
/// @brief Returns thermal materials in stable thermal declaration order.
const DomainCollectionView<IsotropicThermalMaterial>& ThermalMaterials()
const noexcept;
/// @brief Returns DS4 definitions in stable thermal declaration order.
const DomainCollectionView<Ds4ThermalDefinition>& ThermalElements()
const noexcept;
/// @brief Returns centered thermal shell assignments in declaration order.
const std::vector<ThermalShellSectionDefinition>& ThermalSections()
const noexcept;
/// @brief Returns resolved initial temperatures in source order.
const std::vector<ThermalInitialConditionDefinition>&
ThermalInitialConditions() const noexcept;
/// @brief Returns model-level thermal boundary definitions in source order.
const std::vector<ThermalBoundaryConditionDefinition>&
ThermalModelBoundaries() const noexcept;
/// @brief Returns the sole thermal step, or null when the model is
/// structural.
const ThermalStepDefinition* ThermalStep() const noexcept;
/// @brief Returns all properties in stable Domain index order.
const DomainCollectionView<ElementProperty>& Properties() const noexcept;
@@ -243,6 +267,8 @@ class Domain {
DomainCollectionView<ShellSection> shell_sections_view_;
DomainCollectionView<Material> materials_view_;
DomainCollectionView<LinearElasticMaterial> linear_materials_view_;
DomainCollectionView<IsotropicThermalMaterial> thermal_materials_view_;
DomainCollectionView<Ds4ThermalDefinition> thermal_elements_view_;
DomainCollectionView<StepDefinition> steps_view_;
};
+91
View File
@@ -12,9 +12,11 @@
#include "fesa/core/diagnostic.h"
#include "fesa/core/source_identity.h"
#include "fesa/elements/ds4_thermal.h"
#include "fesa/elements/euler_beam_3d.h"
#include "fesa/elements/mitc4_shell.h"
#include "fesa/materials/isotropic_linear_elastic_material.h"
#include "fesa/materials/isotropic_thermal_material.h"
#include "fesa/properties/general_beam_section.h"
#include "fesa/properties/shell_section.h"
@@ -226,6 +228,89 @@ struct DynamicStepDefinition {
std::vector<NodalLoad> loads;
};
/// @brief Stores homogeneous isotropic thermal material source data.
struct ThermalMaterialDefinition {
SourceEntityId source_id;
std::string name;
double conductivity;
double density;
double specific_heat;
SourceLocation location;
};
/// @brief Stores one centered homogeneous thermal shell assignment.
struct ThermalShellSectionDefinition {
SourceEntityId source_id;
std::string name;
double thickness;
EntityIndex material_index;
SourceLocation location;
};
/// @brief Stores one DS4 definition before Domain ownership.
struct Ds4ThermalElementDefinition {
SourceEntityId source_id;
std::array<EntityIndex, 4> node_indices;
EntityIndex section_index;
SourceLocation location;
};
/// @brief Stores one resolved initial temperature target at five stations.
struct ThermalInitialConditionDefinition {
ThermalInitialConditionDefinition(EntityIndex target_node, double value,
SourceLocation source_location)
: node_index{target_node},
station_values{{value, value, value, value, value}},
location{std::move(source_location)} {}
EntityIndex node_index;
std::array<double, 5> station_values;
SourceLocation location;
};
/// @brief Stores one prescribed thermal source DOF value.
struct ThermalBoundaryConditionDefinition {
EntityIndex node_index;
int dof;
double value;
SourceLocation location;
};
/// @brief Stores one signed inward CFlux source contribution.
struct ThermalFluxLoadDefinition {
EntityIndex node_index;
int dof;
double power;
SourceLocation location;
std::size_t source_order{0U};
};
/// @brief Stores uncoupled transient heat-step controls without a time grid.
struct ThermalStepDefinition {
std::string name;
double nominal_increment;
double time_period;
std::uint32_t maximum_increments{100U};
bool nlgeom{false};
std::vector<ThermalBoundaryConditionDefinition> boundaries;
std::vector<ThermalFluxLoadDefinition> loads;
SourceLocation location;
/// @brief Returns thermal boundaries in stable source order.
const std::vector<ThermalBoundaryConditionDefinition>& Boundaries() const
noexcept {
return boundaries;
}
/// @brief Returns additive thermal fluxes in stable source order.
const std::vector<ThermalFluxLoadDefinition>& Loads() const noexcept {
return loads;
}
static constexpr std::array<double, 5> kStationZeta{
{-1.0, -0.5, 0.0, 0.5, 1.0}};
};
/// @brief Stores a stable resolved node-set membership list.
struct NodeSet {
std::string name;
@@ -278,8 +363,11 @@ struct ModelDefinition {
std::vector<EulerBeam3DDefinition> elements;
std::vector<Mitc4ShellDefinition> shell_elements;
std::vector<LinearElasticMaterial> materials;
std::vector<ThermalMaterialDefinition> thermal_materials;
std::vector<GeneralBeamSection> sections;
std::vector<ShellSection> shell_sections;
std::vector<ThermalShellSectionDefinition> thermal_sections;
std::vector<Ds4ThermalElementDefinition> thermal_elements;
std::vector<ShellNodeInitialFrame> shell_node_initial_frames;
std::vector<NodeSet> node_sets;
std::vector<ElementSet> element_sets;
@@ -290,6 +378,9 @@ struct ModelDefinition {
std::vector<MaterialDensityDefinition> densities;
std::optional<FrequencyStepDefinition> frequency_step;
std::optional<DynamicStepDefinition> dynamic_step;
std::vector<ThermalInitialConditionDefinition> thermal_initial_conditions;
std::vector<ThermalBoundaryConditionDefinition> thermal_model_boundaries;
std::optional<ThermalStepDefinition> thermal_step;
std::vector<Diagnostic> warnings;
};