Skip to content

Conversation

@kai0722
Copy link
Member

@kai0722 kai0722 commented Apr 8, 2025

Related issues

#708

Description

Added thermal input from Earth infrared radiation to the thermal calculation.
The main additions for this feature are as follows:

  • Created earth_infrared.cpp/hpp to manage thermal input from Earth infrared radiation

  • Added functionality to calculate thermal input to each node in Node::CalcEarthInfraredRadiation_W (line 98 in node.cpp)

In addition, some thermal-related equations have been revised.
In particular, by adjusting the exponent in Banister's approximation used for albedo calculation, we were able to obtain results that closely match those from Thermal Desktop analyses.

Test results

Below are several comparisons with analysis results from Thermal Desktop. An evaluation of the errors in the analysis results is also included.

example 1)
スクリーンショット 2025-04-08 20 43 29
スクリーンショット 2025-04-08 20 43 19

The errors in 6-panel nodes are shown below.
スクリーンショット 2025-04-08 22 00 14

exampel 2)
スクリーンショット 2025-04-08 20 54 32
スクリーンショット 2025-04-08 20 54 25

The errors in 6-panel nodes are shown below.
スクリーンショット 2025-04-08 22 02 34

example 3)
スクリーンショット 2025-04-08 21 12 48
スクリーンショット 2025-04-08 21 13 52

The errors in 6-panel nodes are shown below.
スクリーンショット 2025-04-08 22 02 57

Impact

The output of thermal calculations will change (with improved accuracy).

@kai0722
Copy link
Member Author

kai0722 commented Apr 8, 2025

@200km
電源状態反映と自己影反映の実装に移る前段階として、まずはそれら無しでTDと同等の精度で解析できるようになる更新をしたく、こちらでPRしました。一部は結構前に取り組んでいたものなので、あまり小分けにレビューしてもらうことができませんでしたが、電源状態反映と自己影反映に移る前に一度確認してもらったほうが良いだろうという意図です。

コンフリクトは解消しておきます

@kai0722
Copy link
Member Author

kai0722 commented Apr 20, 2025

最低限必要な変更のみ残し、不要な変更(userサイドで持つべきマトリクス)はもとに戻した

@200km
Copy link
Member

200km commented Jun 9, 2025

@kai0722 長らく放置してすみません。conflict解除をお願いします。

Copy link
Member

@200km 200km left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conflict解除ありがとうございます。コメントつけました。

[EARTH_INFRARED]
calculation = ENABLE
// Earth infrared temperature hot/cold side [K]. Default value is Global effective temperature of 250K
earth_infrared_temperature_hot_side = 250.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NITS] 変数の最後にKという単位をつけてください。

0,10,10,20,20,10,10
1,0,0,0,0,0,0
2,0,0,0,0,0,0
2,0,0,0,0,0,0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NITS] 必要ない修正に見えます。

private:
double earth_infrared_W_m2_ = 0.0; //!< Earth infrared [W/m^2]
bool is_calc_earth_infrared_enabled_ = false; //!< Calculation flag
double earth_infrared_temperature_hot_side_ = 0.0; //!< Earth infrared temperature hot side [K]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NITS] 変数名に単位を入れてください。

inline void SetIsCalcEarthInfraredEnabled(const bool is_calc_earth_infrared_enabled) {
is_calc_earth_infrared_enabled_ = is_calc_earth_infrared_enabled;
}
inline void SetEarthTempHotSide(const double earth_infrared_temperature_hot_side) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NITS] ここの関数たちにも単位を入れてください。

std::string EarthInfrared::GetLogValue() const {
std::string str_tmp = "";

str_tmp += logger::WriteScalar(earth_infrared_temperature_hot_side_);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Q] 将来的にはこの温度は固定値ではなく変動値になる想定なのでしょうか?

// albedo radiation calculation; earth_albedo_W_m2 reflects the shadow coefficient.
if (cos_theta_albedo > 0.0) {
albedo_radiation_W_ = earth_albedo_W_m2 * area_m2_ * alpha_ * cos_theta_albedo;
double cos_theta = InnerProduct(vec_a, vec_b);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[IMO] この辺りのローカル変数はその後変更する予定が無いものなら、constつけると良いかなと思います。


// Calc view factor
// ref)POWER INPUT TO A SMALL FLAT PLATE FROM A DIFFUSELY RADIATING SPHERE WITH APPLICATION TO EARTH SATELLITES: THE SPINNING PLATE
if (h < 1732e3) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MUST] マジックナンバーは最低限コメントが欲しい。もしくは、const double 変数名で説明_m = 1732e3みたいな感じでもよい。

double Node::CalcEarthInfraredRadiation_W(math::Vector<3> earth_position_b_m, double earth_infrared_W_m2) {
math::Vector<3> earth_direction_b = earth_position_b_m.CalcNormalizedVector();

double lamda = acos(InnerProduct(earth_direction_b, normal_vector_b_));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[IMO] こちらの関数も上のものと同様のコメント

@200km 200km added priority::medium priority medium dynamics dynamics calculation environment environment calculation minor update add functionality in a backwards compatible manner labels Jun 9, 2025
@200km 200km moved this to 🏗 In Progress in S2E Jun 9, 2025
@kai0722
Copy link
Member Author

kai0722 commented Jun 9, 2025

conflict解除ありがとうございます。コメントつけました。

お忙しい中ありがとうございます!
今週来週くらいで空いた時間でパッと対応します!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dynamics dynamics calculation environment environment calculation minor update add functionality in a backwards compatible manner priority::medium priority medium

Projects

Status: 🏗 In Progress

Development

Successfully merging this pull request may close these issues.

3 participants