フィルターのクリア

Simscape block parameter, change dynamically during simulation

21 ビュー (過去 30 日間)
Vitali F.
Vitali F. 2017 年 8 月 9 日
編集済み: Vish 2024 年 6 月 21 日
Hallo,
is it possible to change a parameter of a Simscape block during simulation time?
Example: I want to change the thermal conductivity of the "Conductive Heat Transfer" block during the simulation time.
Example:
The thermal conductivity depends on the transferred heat and the temperature of the sink. For this I have a lookup table or a variable in workspace. Is it possible to check after each iteration the heat from the "Ideal Heat Flow Sensor" and the sink temperature and then send the new thermal conductivity to the "Conductive Heat Transfer" block for the next iteration?
  1 件のコメント
Shinto Thomas
Shinto Thomas 2024 年 2 月 20 日
編集済み: Shinto Thomas 2024 年 2 月 20 日
I have a conductive resistance as a Simscape block, The conductive resistance value of this block should be changed in Matlab. There are two cases should be implemented in the first case it should have constant conductive resistance value 'x' and in another case it accept 'y' as conductive resistance value

サインインしてコメントする。

採用された回答

Steve Miller
Steve Miller 2017 年 8 月 10 日
To do this, create a custom block by modifying the shipping Conductive Heat Transfer block to make the "Thermal conductivity" parameter an input.
  1. Open the source code for the Conductive Heat Transfer block
  2. Save it to a new .ssc file.
  3. Add an inputs section (you can look at the source code for the temperature source block to see what it should look like -- essentially a line with "inputs" and another with "end").
  4. Move the line "th_cond = { 401, 'W/(m*K)' }; % Thermal conductivity" from the "parameters" section of the file to the newly created "inputs" section you just added.
  5. Get a Simscape Components block from the Foundation Utilities Library and point it at that new .ssc file you just created.
Congratulations! You have just created your first custom Simscape component.
--Steve
  2 件のコメント
Vitali F.
Vitali F. 2017 年 8 月 10 日
Thank you, it works!
Vish
Vish 2024 年 6 月 21 日
編集済み: Vish 2024 年 6 月 21 日
Hi,
I wanted to do something similar but for Air Spring component. I have checked the component and it is a .sccp protected file. Is it still possible to customize the code?

サインインしてコメントする。

その他の回答 (1 件)

Marlon Saveri Silva
Marlon Saveri Silva 2018 年 8 月 28 日
Dear all, I have the same question. I'd like to make the conductivity changes with the temperature; however, I didn't understand exactly where to introduce the k(T) equation in the code. Do you have any exemple?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by