Activity for The One

  • The One The One posted a comment on discussion Python Scripting

    Start a new discussion thread for such questions to help other people with similar doubt. coming back to your question, the above command is used to print text or variables in the text box where errors are written (message box).

  • The One The One posted a comment on discussion Python Scripting

    https://dwsim.fossee.in/custom-model/custom-model-run/12 Have a look at this model. Should answer your query.

  • The One The One modified a comment on discussion Open Discussion

    Ohk. Thanks for the feedback. What property package would you suggest for NaOH + Water mixture?

  • The One The One posted a comment on discussion Open Discussion

    Ohk. Thanks for the feedback. Would you suggest any other property package for NaOH + Water mixture?

  • The One The One posted a comment on discussion Open Discussion

    Find out which component is the limiting reagent and select that as base component. If none of the reagents are exhausted, I believe you can choose any reactant as base component. Only thing to note is that the enthalpy of reaction would be calculated according to that selected base component.

  • The One The One posted a comment on discussion Open Discussion

    Hello Daniel, I wanted to simulate a heat exchanger which has cold fluid 30% by mass aqueous NaOH solution and hot fluid condensing steam. I am using Reaktoro property package for the cold fluid and Steam table for steam. Since there will be partial vaporization of cold stream, I wanted to ask whether Reaktoro supports vapor-liquid calculation or not. Upon simulating with Calculation type as: "Specify Outlet Molar Vapor Fraction (Stream 2)", I am getting the error: "Unsupported Vapor Pressure Calculation"....

  • The One The One posted a comment on discussion Open Discussion

    Thanks a lot Daniel!! Working good in v6.4.2 with all the thermodynamic packages.

  • The One The One posted a comment on discussion Open Discussion

    Yes, I tried modified UNIFAC (Dortmund and NIST). Still the same problem persists.

  • The One The One posted a comment on discussion Open Discussion

    This is not the case only in NRTL. I used other thermodynamic methods- PR; PR/Lee-Kesler; SRK; Raoult's Law from database and still getting same result. Also, I do not think the error is due to no binary interaction parameters since DWSIM should not have allowed the decision of using acrylic acid as light key component due to higher boiling point of acrylic acid, which it is doing in present scenario.

  • The One The One posted a comment on discussion Open Discussion

    Good Morning, I wanted to simulate a shortcut distillation column for separation of Acrylic Acid, Water and Acetic Acid. On entering the heavy key as acrylic acid and light key as water, shortcut column was giving the following error: Error SC-012: Invalid value for Distillate Rate: NaN Parameter name: D On switching the light key to acrylic acid and heavy key to water (which is wrong due to higher boiling point of acrylic acid), I am getting the simulation of shortcut column completed with acrylic...

  • The One The One posted a comment on discussion Python Scripting

    Hey everyone, I am trying to find the temperature of steam, given pressure and entropy. I have used the following code in order to achieve so: tmp = Flowsheet.PropertyPackages.Values.ToList()[1] S = tmp.CalculateEquilibrium2(FlashCalculationType.PressureEntropy, PeHE, S1, 0) Property Package Steam Tables is stored in the tmp variable which is subsequently used in following line. The error that it returns is: "Object Reference not set to an instance of an object". As a corrective measure, I tried...

  • The One The One posted a comment on discussion Python Scripting

    Hi Linus, I went through your code. I am unable to find the bug.

  • The One The One posted a comment on discussion Python Scripting

    Could you also attach the custom model .dwxml file

  • The One The One modified a comment on discussion Python Scripting

    Hey Linus, I am a bit confused regarding the conservation of energy equation. Is it possible for you to post the Custom Model? I would love to go through it. Thank you, Regards

  • The One The One posted a comment on discussion Python Scripting

    Hey Linus, I am a bit confused regarding the conservation energy. Is it possible for you to post the Custom Model? I would love to go through it. Thank you, Regards

  • The One The One posted a comment on discussion Python Scripting

    Hey Linus, I don't think the energy is balanced. Heat load can be calculated as Hout-Hin. In this case, heat load should have been (27391.9-28006.2)x44.4761/3600 =-7.6 KW. Check your energy balance once. Thank you

  • The One The One posted a comment on discussion Python Scripting

    The updated code used by me was: feed=[0] feed[0]=ims1 feed[0].PropertyPackage.CurrentMaterialStream = feed[0] tmp=feed[0].PropertyPackage.CalculateEquilibrium2(FlashCalculationType.PressureVaporFraction, P2, 0, 200) T2 = tmp.CalculatedTemperature

  • The One The One posted a comment on discussion Python Scripting

    The error popping up is that, "name 'FlashCalculationType' is not defined". I guess it is specified using another syntax. Could you confirm this? Thank you

  • The One The One posted a comment on discussion Python Scripting

    Hey Daniel, I am getting an error in the following IronPython code to find the equilibrium temperature for given pressure and vapor fraction. Code: feed=[0] feed[0]=ims1 tmp = feed[0].PropertyPackage.CalculateEquilibrium2(FlashCalculationType.PressureVaporFraction, P2, 0, 200) T2 = tmp.CalculatedTemperature Kindly help me out with this. Thank you

  • The One The One posted a comment on discussion Python Scripting

    Hey Daniel, I am designing a Mechanical Vapor Recompression system using custom model. I have the following 2 doubts: 1) How to get the bubble point temperature of a mixture given its pressure using IronPython Script. 2) How to get temperature from other combination of properties like Pressure, Entropy? Thank you

  • The One The One modified a comment on discussion Dynamic Simulation

    Hi Daniel, The new lines of code in above link seems perfect to me but they were for the case of given outlet pressure. Also, i saw the changes done in code for calculation of outlet pressure given Kv (updated line 448 in above link). Though i am not aware of the syntax of VBA, i think that MathOps.Quadratic.quadForm function will return a 2x1 matrix consisiting of both the roots of which, we should select the value which gives (p1-p2)<(p1)/2. However, this would cause the selection of only one root...

  • The One The One posted a comment on discussion Dynamic Simulation

    Hi Daniel, The new lines of code in above link seems perfect to me but they were for the case of given outlet pressure. Also, i saw the changes done in code for calculation of outlet pressure given Kv. Though i am not aware of the syntax of VBA, i think that MathOps.Quadratic.quadForm function will return a 2x1 matrix of which, we should select the value which gives (p1-p2)<(p1)/2. However, this would cause the selection of only one root of pressure. Also, according to the equations given in the...

  • The One The One modified a comment on discussion Dynamic Simulation

    Hey Daniel, Is it possible to design a valve with outlet pressure less than (p1)/2 with current calculation method? I would require it for designing a throttle valve in one the simulations running in dynamic mode. The current calculation procedure accounts for only outlet pressure greater than (p1)/2. Thank you.

  • The One The One posted a comment on discussion Dynamic Simulation

    Hey Daniel, I have attached a photo of valve outlet pressure calculation in valve for the case- Kvmax specified. The issue I feel with the current code of valve is that it does not allow user to choose whether he/she wants to select the outlet pressure value closed to p1 (inlet pressure) or the value far from p1 because of the initial condition of (outlet pressure) p2=0.7p1. For instance, if I want the value of outlet pressure to be 0.044 bar (wrt photo attached), i would be unable to do so in Kvmax...

  • The One The One posted a comment on discussion Dynamic Simulation

    Hey Daniel, I would like to ask whether a plant which does not have any material inlet or outlet stream can be simulated in dynamic mode or not? The quantity of matter inside the plant is fixed. The plant is Geothermal Heating System and it comprises of heaters, coolers and compressors. If it is possible, then do I need to place valves as we do it for plants having inlet and outlet material streams? Thank you

  • The One The One posted a comment on discussion Dynamic Simulation

    Hey Daniel, Thanks for your reply. I implemented the changes suggested by you in above flowsheet. It ran successfully. However, when I am increasing the mass flow again to 1kg/s, the error pops in despite correct valve sizing. On clicking the calculate Kv(max) button, NaN is being displayed. I am unable to understand you is this happening. Also, I saw the code of valve. I wanted to ask the reason behind running 1000 iterations for the gas flow condition for low pressure drop, when the value of p2...

  • The One The One posted a comment on discussion Dynamic Simulation

    Hey Daniel, First of all, congrats on buiding such a great functionality in this software. I wanted to ask regarding a problem which i am currently facing while simulating a heater in dynamic simulation. I have attached the file below. The pressure of outlet stream of valve V-019 (H1 inlet) is being adjusted to to a value higher than pressure in MSTR-018. I am unable to figure out the reason for this. Also, I am unable to resolve the error in MSTR-008. I would be glad if you could help me out with...

  • The One The One posted a comment on discussion Python Scripting

    Thanks a lot Luca Finardi

  • The One The One posted a comment on discussion Python Scripting

    How can i create a 2-dimensional plot in DWSIM given 2 arrays of same size?

  • The One The One posted a comment on discussion Python Scripting

    Thanks it worked.

  • The One The One posted a comment on discussion Python Scripting

    Even after this modification, it is returning an empty array for a. I am using version 5.6 update 12. This version has the values for heat capacities. right?

  • The One The One posted a comment on discussion Python Scripting

    I had written the code: from DWSIM.Thermodynamics import import math from System import Array import clr clr.AddReference('DWSIM.MathOps.DotNumerics') from DotNumerics.ODE import feed=[0] feed[0]=ims1 a=feed[0].GetTDependentProperty("idealgasheatcapacity",298.15,"Argon",None) Flowsheet.WriteMessage(str(a)) DWSIM is returning an empty array. I think I have written the arguments in wrong format. The prescribed format suggested in VB code is: GetTDependentProperty(ByVal props As Object, ByVal temperature...

  • The One The One posted a comment on discussion Python Scripting

    Hey Daniel, I just wanted to see how GetTDependentProperty works. So i made just a material stream with only Argon as component in it. I have written the code as: a=feed[0].GetTDependentProperty("idealgasheatcapacity",298.15,"Argon","mass") I am getting the result of a as: Arrayfloat. Can u tell me how to input the parameters? Thank You

  • The One The One posted a comment on discussion Python Scripting

    Thank you. Would be great if you could give an example of how to execute this in python.

  • The One The One posted a comment on discussion Python Scripting

    i am designing a batch reactor. I wanted the parameters of Cp value for the adiabatic condition. I am using the equation (Heat of reaction at temperature T)=(Increase in sensible heat of final products) + (Heat taken by products as latent heat). As of now, i am ignoring phase change and want to design for homogenous system. I require the value of parameters of Cp for finding the heat of reaction at temperature T. I am using the formula (Heat of reaction at standard temperature T0) + (integral from...

  • The One The One modified a comment on discussion Python Scripting

    I require the parameters to solve it. Also is there a way i can extract the appropriate equation for the corresponding phase? Thank you.

  • The One The One posted a comment on discussion Python Scripting

    I require the parameters to solve it.

  • The One The One posted a comment on discussion Python Scripting

    Hi. I am coding for a batch reactor in DWSIM. I require data of specific heat capacity of individual species in order to complete the reactor. Can someone help me out on how to extract the heat capacity data of individual species from ChemSep, CheDL database?

  • The One The One posted a comment on discussion Python Scripting

    In RungeKutta45 method, what does exception :larger nmax needed means?

  • The One The One posted a comment on discussion Python Scripting

    Thank you very much. This solved my problem.

  • The One The One posted a comment on discussion Python Scripting

    Would be gr8 if u could once see the file.

  • The One The One posted a comment on discussion Python Scripting

    I am still getting the same error: "name "OdeFunction" not defined".

  • The One The One posted a comment on discussion Python Scripting

    Thanks for replying. What modules should be imported for the above code to run? I am getting error "name "OdeFunction" not defined". I am working on version 5.7, update 12.

  • The One The One posted a comment on discussion Python Scripting

    Hi, I am trying to model a batch reactor in DWSIM using python. I was not able to understand the syntax for ode solver given in example code by Daniel. Can someone just write the code on how to solve ODE with all appropriate import statements? Thank you

  • The One The One posted a comment on discussion Python Scripting

    Thank you Daniel. This solved my problem.

  • The One The One posted a comment on discussion Python Scripting

    I did not understand what you meant by adding list as string variable and not double. Can u tell the syntax to add list as string variable?

  • The One The One posted a comment on discussion Python Scripting

    I got error when used [2,2]: ,"Conversion from type string to type double is not valid"

  • The One The One posted a comment on discussion Python Scripting

    Thank you Daniel for replying I want to create a batch reactor in DWSIM through User models-Python script. I will be taking input through scripting variables input section. I wanted to input a list of stoichometries of compounds involved in reaction. However, i am unable to input a list in the scripting varible section. The error that pops up is, "Conversion from type string to type double is not valid". I used the syntax [1,1] to input the stoichometries. Moreover, when i use syntax (2,2) for list...

  • The One The One posted a comment on discussion Python Scripting

    Hi, I want to take a list as input through scripting variables in user model-python script. I am unable to do so. Can anyone help out?

1