#*------------------------------------------------------------------- * 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. * *-------------------------------------------------------------------- * Sample file for Case Study *-------------------------------------------------------------------- * *---------------------------------------------------------------------- * Author: Edson Cordeiro do Valle * *--------------------------------------------------------------------*# #Model with degrees of freedom complete in the model: 2 vars. and 2 eqs. #Warning : The units must be consistent in order to convert it correctly in the #CaseStudy section Model CS1 VARIABLES X as Real (Default=20,Lower=-10,Upper=1000, final Unit = 'm'); Y as Real (Default=200,Lower=-10000,Upper=100000000, final Unit = 'm^2'); PARAMETERS b0 as Real(Default=7, final Unit = 'm'); b1 as Real(Default=3, final Unit = 'm'); EQUATIONS #Y = b0*X^2 +b1^2*X; b0*Y = b1^2*X; Y = X ^ 2; end #Model with degrees of freedom UNCOMPLETE in the model: 2 vars. and 1 eqs., # need to specify 1 var. in the flowsheet section. #Warning : The units must be consistent in order to convert it correctly in the #CaseStudy section Model CS_flow1 VARIABLES X as Real (Default=2,Lower=-10,Upper=1000, final Unit = 'm'); Y as Real (Default=2,Lower=-10000,Upper=100000000, final Unit = 'm^2'); PARAMETERS b0 as Real(Default=7, final Unit = 'm'); b1 as Real(Default=3, final Unit = 'm'); EQUATIONS b0*Y = b1^2*X; end #Model with degrees of freedom complete in the model: 3 vars. and 3 eqs. #Warning : The units must be consistent in order to convert it correctly in the #CaseStudy section Model CS3 VARIABLES X as Real (Default=20,Lower=-10,Upper=1000, final Unit = 'm'); X2 as Real (Default=20,Lower=-10,Upper=1000, final Unit = 'm'); Y as Real (Default=200,Lower=-10000,Upper=100000000, final Unit = 'm^3'); PARAMETERS b0 as Real(Default=7, final Unit = 'm'); b1 as Real(Default=3, final Unit = 'm'); EQUATIONS Y = b0*X2^2 +b1^2*X2 -50.73*'m^3'; b0*Y/'m' = b1^2*X; Y = X ^ 2*'m'; end #Model with degrees of freedom UNCOMPLETE in the model: 3 vars. and 2 eqs., # need to specify 1 var. in the flowsheet section. #Warning : The units must be consistent in order to convert it correctly in the #CaseStudy section Model CS_flow2 VARIABLES X as Real (Default=20,Lower=-10,Upper=1000, final Unit = 'm'); X2 as Real (Default=20,Lower=-10,Upper=1000, final Unit = 'm'); Y as Real (Default=200,Lower=-10000,Upper=100000000, final Unit = 'm^2'); PARAMETERS b0 as Real(Default=7, final Unit = 'm'); b1 as Real(Default=3, final Unit = 'm'); EQUATIONS Y = b0*X^2/'m' +b1^2*X2/'m' -50.73*'m^2'; #b0*Y = b1^2*X; Y = X ^ 2; end #No need to specify FlowSheet Test_CS1 as CS1 OPTIONS Dynamic = false; end FlowSheet Test_CS_flow1 as CS_flow1 SPECIFY X = 5 * 'm'; OPTIONS Dynamic = false; end #No need to specify FlowSheet Teste_CS3 as CS3 OPTIONS Dynamic = false; end FlowSheet Test_CS4 as CS_flow2 SPECIFY X = 2.2*'m'; OPTIONS Dynamic = false; end # Test only parameters with vectors of type: [ 0: 1: 10] CaseStudy CS_parameter as Test_CS1 VARY b0 =[ 7 : 0.1: 7.2]; b1 =[ 3 : 0.1: 3.1]; RESPONSE Y ; end # Test only specifications with vectors of type: [ 0, 1, 2] CaseStudy CS_spec as Test_CS_flow1 VARY X = [5, 6, 7]; RESPONSE Y ; end # Test mixed: par. and spec. with both type of vectors CaseStudy CS2_par_spec as Test_CS_flow1 VARY X = [5, 6, 7]; b0 =[ 7 : 1: 10]; RESPONSE Y ; end # Test mixed: par. and spec. with both type of vectors and units CaseStudy CS_Unit_Vary as Test_CS4 VARY b0 =[ 7 : 0.01: 7.01]*'cm'; X =[ 220 : 1: 221]*'cm'; RESPONSE Y ; end # Test mixed: par. and spec. with both type of vectors and units CaseStudy CS_Unit_Response as Test_CS4 VARY b0 =[ 7 : 0.01: 7.01]; X =[ 220 : 1: 221]*'cm'; RESPONSE Y'cm^2' ; end