#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. * * This LIBRARY is free software; you can distribute it and/or modify * it under the therms of the ALSOC FREE LICENSE as available at * http://www.enq.ufrgs.br/alsoc. * * EMSO Copyright (C) 2004 - 2007 ALSOC, original code * from http://www.rps.eng.br Copyright (C) 2002-2004. * All rights reserved. * * EMSO is distributed under the therms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. * *---------------------------------------------------------------------- * Author: Rafael de Pelegrini Soares * Paula Bettio Staudt * $Id: sample_arrays.mso 176 2007-03-04 04:56:54Z arge $ *--------------------------------------------------------------------*# Model Arrays PARAMETERS Dimension as Integer(Brief="Integer dimension", Default=3); Scalar as Real(Default=1); VARIABLES Var1(Dimension,Dimension) as Real(Default=1); Var2(Dimension,Dimension) as Real(Default=1); EQUATIONS for i in [1 : Dimension] diff(Var1(1,i)) = Var2(1,i)/'s'; end diff(Var1(2:Dimension,:)) * 's' = Scalar*Var2(2:Dimension,:); exp(Scalar)*Var2 = sin(time * '180*grad/s'); end FlowSheet SampleArrays DEVICES dev1 as Arrays; INITIAL dev1.Var1 = -1; OPTIONS TimeStep = 0.1; TimeEnd = 3.1415; end