How to model this first order differential equation with two dependent variables

Vikram_22246
Vikram_22246
Altair Employee
edited February 2023 in Community Q&A

image

image

 

Ignoring the circled component in the equation, the block is modeled as depicted. How to plug in the circled component to the model so that I get the Ts and Ws results with respect to time?

All other variables other than Ts, Tw, and Td are constants. 

If it's not possible to model the above equation in this way, kindly let me know other ways to model the same. In short, i have to model two dependent variable differential eqn, even any similar examples for reference will help.

 

I have attached the above block along with this post, for u reference. 

 

Answers

  • João Marabisa
    João Marabisa
    Altair Employee
    edited February 2023

    Hi Vikram,

    There are several ways to do it! Below I'm using two different approaches to have a variable based on the simulation time (note that you can also do variables based in another variables, not just in the simulation time):

    1 - LookUpTables

    2 - Using if-statement: If it's equal and smaller than 15 sec, the output will be sin(t), else it will be 2*sin(t):

    image

    Model is attached - Hope it helps you.

  • Vikram_22246
    Vikram_22246
    Altair Employee
    edited February 2023

    Thanks, Joao. will try it out with your suggestion. 

  • Vikram_22246
    Vikram_22246
    Altair Employee
    edited February 2023

    Thanks, Joao. will try it out with your suggestion.