Quantcast
Channel: COMSOL Forums: Please Help - How to use calculated value of a function F at time step 1, for calculation at time step 2 and so on
Viewing all articles
Browse latest Browse all 21

Re: Please Help - How to use calculated value of a function F at time step 1, for calculation at time step 2 and so on

$
0
0
I am not sure how to program per time step, because I think in general COMSOL chooses it's own time steps. What is your variable T? I can immagine that A(T) would have to depend on the size of your time step, so is T the size of your time step? I would linearize A(T), so it would be approximately equal to A(0)+T*(dA/dT)_0, which always holds if your time step is sufficiently small ((dA/dT)_0 is dA/dT calculated at T=0). Then you would have

(F(t+T)-F(t))=A(T)=A(0)+T*(dA/dT)_0

dividing both sides by T you get

(F(t+T)-F(t))/T=A(0)/T+(dA/dT)_0

The left hand side is the definition of the differential, so you would get

dF/dt=A(0)/T+(dA/dT)_0

Which shows that A should approach 0 when your time step approaches 0, otherwise A(0)/T will be infinite. So A(0)=0 so

dF/dt=(dA/dT)_0

I would say that such a differential equation can be implemented somewhere in your model.


Viewing all articles
Browse latest Browse all 21

Trending Articles