Matlab Computation and Applied Modelling

48 Views Asked by At

Worked out so far; four equations from Newtons law of cooling: T=temp T*= environmental temp. S= salinity S*= environmental Salinity H= salt flux

dT1/dt = k(T1-T1*) dT2/dt = -k(T2-T2*) dS1/dt = k(S1-S1*) - H dS2/dt = -k(S2-S2*) + H

I figured these could be reduced further for example: dT2/dt - dT1/dt = d(delta T)/t = -k(T2-T2*) - k(T1-T1*)

my question is in order to solve the ode : do I have to solve for dT1/dt and dT2/dt separately: giving T1-T1* = Ce^kt for example and substitute the solutions to find d(delta T)/t so that d(delta T)/t = -k(ce^kt)... or do I have to solve d(delta T)/t as it is.

Also computing it in matlab using Syms: but not too sure how.

1

There are 1 best solutions below

1
On BEST ANSWER

From your model

$$ \cases{ \frac{dT_1}{dt}=k(T_1-T_1^*)\\ \frac{dT_2}{dt}=-k(T_2-T_2^*)\\ \frac{dS_1}{dt}=k(S_1-S_1^*)-H\\ \frac{dS_2}{dt}=-k(S_2-S_2^*)+H\\ } $$

we can conclude that all the variables involved $T_1,T_2,S_1,S_2$ are each other independent. They depend only on $t$ which the independent variable hence we can solve independently for each $T_1,T_2,S_1,S_2$