MrBlonde81

Apr 16 2009, 06:45 AM

Hi

I am trying to model a wave motion in an open channel with Modelica. I would like to model the wave in 1D with a discretized partial differential equation (pressure fluctuations etc).

Does anybody have some sample code for solving such a problem?

//MrBlonde

RungeZipperer

Apr 16 2009, 07:06 AM

Where exactly do you expect problems? If you know how to implement a derivative with respect to the variables you need...thatīs all or?

What about this?

http://en.wikipedia.org/wiki/Numerical_differentiation
MrBlonde81

Apr 16 2009, 07:19 AM

I have discretized PDE:s with Modelica before (continuty equation etc) but I wanted to compare with somebody else how had done it for a wave equation.

Nevertheless.... I found a book on the topic.

QUOTE(RungeZipperer @ Apr 16 2009, 07:06 AM)

Where exactly do you expect problems? If you know how to implement a derivative with respect to the variables you need...that all or?

What about this?

http://en.wikipedia.org/wiki/Numerical_differentiation