- In Simulink, use a temperature sensor block to measure the temperature output from the convective heat transfer system.
- Use a MATLAB Function block to compare the measured temperature to the saturation temperature, and output a boolean value indicating whether or not the saturation temperature has been reached.
- Use the boolean output from the MATLAB Function block to switch between the convective and evaporative heat transfer systems using a Switch block.
- In the evaporative heat transfer system, use a saturation pressure block to calculate the saturation pressure at the current temperature.
- Use this saturation pressure value in a Pressure Transducer block to measure the pressure at the evaporative heat transfer surface.
- Use this pressure value to calculate the evaporation rate using a MATLAB Function block.
Is there a way to switch between two thermal branches in a simscape model?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Delika Weragoda
am 29 Mär. 2023
Kommentiert: Delika Weragoda
am 30 Mär. 2023
Hi,
I'm trying to model a heat transfer scenario, during the initial transient state, there is convective heat transfer in the system and afterwards evaporative heat transfer occurs.
I've defined both these scenarios using simscape blocks, however, I want to modify the model so that the latter occurs at the saturation temperature. Hence the need to monitor the output temperature and switch the model from a convective heat transfer system to a evaporative heat transfer system.
Is there a particular block that could possibly be used for this, or is it possible to create a switch block (similar to electrical) for the thermal domain as well?
Any advice is much apprciated.
Thanks
Del
0 Kommentare
Akzeptierte Antwort
Jack
am 29 Mär. 2023
Yes, it is possible to create a switch block for the thermal domain in Simulink/Simscape. One way to implement this is to use a combination of Simulink and MATLAB functions.
Here's a high-level overview of how you could approach this:
Note that the specifics of your model may vary depending on the exact scenario you're modeling, but this general approach should work for most cases.
I hope this helps! Let me know if you have any further questions.
3 Kommentare
Jack
am 30 Mär. 2023
- Input signal size: If your temperature sensor outputs a [1 x 1] signal (time and temperature), you can use a "Selector" block in Simulink to extract the temperature value and pass it to the input of your function block. The Selector block allows you to select a specific element or range of elements from an input signal. In your case, you would select the second element (the temperature value) of the [1 x 1] signal.
- Undefined variables: If you are getting an error related to undefined variables, it could be because the Simulink model is not able to access the variables defined in your workspace. To make the variables accessible to the Simulink model, you can use the "From Workspace" block in Simulink. The From Workspace block allows you to import data from the MATLAB workspace into the Simulink model. You can connect this block to the input of your function block to provide the necessary input data. Make sure that the variable names in the From Workspace block match the variable names defined in your workspace.
Regarding linking the function block to the workspace, you do not need to link the block to the workspace explicitly. Simulink automatically looks for variables with the same name in the workspace and uses them as input signals. However, you may need to adjust the variable scope and access settings to ensure that the Simulink model can access the variables.
I hope this helps! Let me know if you have any further questions or if you need additional assistance with your Simulink model.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Two-Phase Fluid Library finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!