22 getParameters(
double &stefan_boltzmann_constant,
double &emissivity_parameter,
23 double &ambient_temperature, boost::shared_ptr<Range> &ents,
28 auto cubit_meshset_ptr =
29 m_field.
getInterface<MeshsetsManager>()->getCubitMeshsetPtr(ms_id,
31 std::vector<double> block_data;
32 CHKERR cubit_meshset_ptr->getAttributes(block_data);
33 if (block_data.size() < 3) {
35 "Expected that radiation block has three attributes "
36 "(Stefan–Boltzmann "
37 "constant, emissivity parameter, and ambient temperature)");
39 stefan_boltzmann_constant = block_data[0];
40 emissivity_parameter = block_data[1];
41 ambient_temperature = block_data[2];
45 <<
"Stefan–Boltzmann constant " << stefan_boltzmann_constant;
47 <<
"Emissivity parameter " << emissivity_parameter;
49 <<
"Ambient temperature " << ambient_temperature;
51 ents = boost::make_shared<Range>();
52 CHKERR m_field.
get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
65 template <AssemblyType A,
typename EleOp>
72 boost::shared_ptr<VectorDouble> t_ptr);
78 boost::shared_ptr<VectorDouble>
tPtr;
82 template <AssemblyType A,
typename EleOp>
89 std::string row_field_name, std::string col_field_name,
90 boost::shared_ptr<VectorDouble> t_ptr);
96 boost::shared_ptr<VectorDouble>
102 template <AssemblyType A,
typename EleOp>
103 OpFluxRhsImpl<ThermoElasticOps::RadiationBcType<BLOCKSET>, 1, 1,
A,
GAUSS,
106 boost::shared_ptr<VectorDouble> t_ptr)
110 this->stefanBoltzmanConstant, this->emmisivityParameter,
111 this->ambientTemperature, this->entsPtr, m_field, ms_id, Sev::inform),
112 "Cannot read radiation data from blockset");
115 template <AssemblyType A,
typename EleOp>
123 auto t_w = OpBase::getFTensor0IntegrationWeight();
125 auto t_row_base = row_data.getFTensor0N();
132 -t_w * (std::pow(t_temp, 4) - std::pow(ambientTemperature, 4));
148 auto t_normal = OpBase::getFTensor1Normal();
149 OpBase::locF *= t_normal.l2() * stefanBoltzmanConstant * emmisivityParameter;
151 EntityType fe_type = OpBase::getNumeredEntFiniteElementPtr()->getEntType();
152 if (fe_type == MBTRI) {
159 template <AssemblyType A,
typename EleOp>
160 OpFluxLhsImpl<ThermoElasticOps::RadiationBcType<BLOCKSET>, 1, 1,
A,
GAUSS,
162 std::string row_field_name,
163 std::string col_field_name,
164 boost::shared_ptr<VectorDouble> t_ptr)
165 :
OpBase(row_field_name, col_field_name,
OpBase::OPROWCOL), tPtr(t_ptr) {
171 this->stefanBoltzmanConstant, this->emmisivityParameter,
172 this->ambientTemperature, this->entsPtr, m_field, ms_id,
174 "Can not read radiation bc from blockset");
177 template <AssemblyType A,
typename EleOp>
186 const double vol = OpBase::getMeasure();
188 auto t_w = OpBase::getFTensor0IntegrationWeight();
190 auto t_row_base = row_data.getFTensor0N();
195 const auto alpha = t_w * 4 * std::pow(t_temp, 3);
201 const auto beta = alpha * t_row_base;
203 auto t_col_base = col_data.getFTensor0N(gg, 0);
215 auto t_normal = OpBase::getFTensor1Normal();
219 -t_normal.l2() * stefanBoltzmanConstant * emmisivityParameter;
221 EntityType fe_type = OpBase::getNumeredEntFiniteElementPtr()->getEntType();
222 if (fe_type == MBTRI) {
231 struct AddFluxToRhsPipelineImpl<
239 AddFluxToRhsPipelineImpl() =
delete;
243 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
245 boost::shared_ptr<VectorDouble> T_ptr, std::string block_name,
Sev sev
250 using OP = OpFluxRhsImpl<ThermoElasticOps::RadiationBcType<BLOCKSET>,
253 auto add_op = [&](
auto &&meshset_vec_ptr) {
254 for (
auto m : meshset_vec_ptr) {
266 m_field.
getInterface<MeshsetsManager>()->getCubitMeshsetPtr(
269 (boost::format(
"%s(.*)") % block_name).str()
278 "Handling of bc type not implemented");
287 struct AddFluxToLhsPipelineImpl<
295 AddFluxToLhsPipelineImpl() =
delete;
299 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
301 std::string col_field_name, boost::shared_ptr<VectorDouble> T_ptr,
302 std::string block_name,
Sev sev
307 using OP = OpFluxLhsImpl<ThermoElasticOps::RadiationBcType<BLOCKSET>,
310 auto add_op = [&](
auto &&meshset_vec_ptr) {
311 for (
auto m : meshset_vec_ptr) {
313 pipeline.push_back(
new OP(m_field,
m->getMeshsetId(), row_field_name,
314 col_field_name, T_ptr));
323 m_field.
getInterface<MeshsetsManager>()->getCubitMeshsetPtr(
326 (boost::format(
"%s(.*)") % block_name).str()
335 "Handling of bc type not implemented");