Refinery nadiracm  Posts: 6 Threads: 2 Joined: Apr 2020 13-06-2020, 07:32 AM Hello, I want to constraint output commodity with minimum and maximum cetane numbers to get the optimized value of the blending percentage. how to input those constraints in the VEDA model? In my model, I have FAME, HVO, and Diesel Oil with cetane number (CN) are 51, 65, and 48. The constraint of CN is 49 for the minimum limit. How to optimize the blending percentage for FAME (x%), HVO (y%), diesel oil (z%)? Need to know x,y,z value. Thank you.. Antti-L TIMES Aide Posts: 935 Threads: 9 Joined: Jun 2010 13-06-2020, 09:24 PM (This post was last modified: 15-06-2020, 02:46 AM by Antti-L.) This sounds like a typical refinery characteristic constraint. However, note that the cetane number (CN) blends linearly by volume. This means that in order to formulate the cetane constraint, one should first convert the energy flows into volume flows, or, alternatively, convert the cetane numbers by volume (CN) into cetane numbers by energy (CNN). Let's assume the second case, and denote by DEN(x) the specific energy density (GJ/m3) of stream x. So, we can calculate:    CNN(x) = CN(x) / DEN(x) Here, we should of course know the energy density of the output stream(s) as well. Assume that we have input streams Input(i) and output streams Output(j). The constraint for the minimum cetane characteristic can then be written as follows:  SUM(i, FLOW(Input(i)) × CNN(Input(i)))  ≥  SUM(j, FLOW(Output(j)) × CNN(Output(j))) Or by rearranging all the terms to the LHS side:  SUM(i, FLOW(Input(i)) × CNN(Input(i))) −  SUM(j, FLOW(Output(j)) × CNN(Output(j))) ≥ 0 That could be directly translated into a user constraint for that inequality, and similarly for a maximum cetane number.  But to illustrate an alternative approach for the single output case, we could also introduce a new commodity 'Cetane' of type ENV, and define the following parameters:  FLO_EMIS(r,y,p,Input(i),'Cetane','ANNUAL') = CNN(Input(i))    ∀ i Finally, we need to bound the total Cetane from the inputs, as defined above, to have the minimum and maximum levels in the single Output stream. This could be done with a FLO_SHAR parameter as follows (interpolation option would also be needed):  FLO_SHAR(r,y,p,'Cetane',Output,'ANNUAL','LO') = CNNMin(Output);  FLO_SHAR(r,y,p,'Cetane',Output,'ANNUAL','UP') = CNNMax(Output); However, if the energy density of the Output is not actually known, but instead we should assume that the volume blends linearly, we can calculate the volume of the Output stream endogenously, and define the Min/Max share constraints in terms of Cetane by Volume. In that case one could introduce another commodity 'Volume' of type ENV, and define similar FLO_EMIS parameters giving the Output Volume. Then the FLO_SHAR parameters should be defined beween Cetane and Volume using the CN(Output) values instead of the CNN(Output) values. nadiracm  Posts: 6 Threads: 2 Joined: Apr 2020 15-06-2020, 08:48 AM Well noted Anty, thank you.. « Next Oldest | Next Newest » 