Activity for Luca Finardi

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Vito, you can create a simple python script coupling the pressure increase in the vessel through the EOS and the power absorbed by the compressor and then integrate in discrete times to find the energy required. Here DWSIM can be of help in getting the thermodynamic properties and in the calculation of compressor power. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Tanatip, if you enable the calculate Heat Exchange Profile, run the model and look at the Evaporator Q vs t profile (see screenshot) you see a temperature cross. Moreover this profile is always in co-current, regardless if a countercurrent flow direction is selected. I tried to chart the cold stream temperatures data in reverse order, but still a T cross appears. I am not sure whether this is a bug in the program due to phase change in the exchanger, but I suspect that the results could not be...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Tanatip, I had a look to your ORC model ... I found something strange in the evaporator. The heat and temperature profiles have a temperature cross that I can't understand ... even changing the data in countercurrent configuration (apparently DWsim only makes the profile only in co-current) the cold stream becomes hotter that the hot stream ... Isn't there something wrong? Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello! See attached model. Now it works, I added another recycle and made some other adjustments. With 2 simulatneous recycle blocks seems unstable, so my recommendation is to let them non-active and activate one at a time. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Phakin, attached my deaerator model's attemp. It includes a cooler to simulate the steam condensing and an heater to simulate the condensate heating. The two exchangers are energy-linked so that the condensing steam transfers heat to the condensate. Finally the two streams are mixed together as boiler feedwater. A controller adjusts the amount of superheated steam in order to have the BFW at saturation point. A splitter simulates the vent from deaerator, here set at 2% of the inlet steam. As...

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    Hi Joe, if you want to include your feedwater heater in a thermodynamic model, you can simulate it with a cooler and an heater coupled through a specification block. You can either model as a single couple and set directly the temperature difference on the steam side or as two coupled cooler-heater if you want to have control of the degree of subcooling on the drain side. See the attached model with both options. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Looks that in rel 8.6.8 works.

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Daniel, I came across the same error pointed out in this post: the compressor model seems not to work when the Calculation Type is 'Performance Curves'. Checking the UnitOperations/Compressor.vb code, from line 436 there are several interpolations made by calling MathNet.Numerics.Interpolate.Linear. I presume there is something wrong here since the simulation error returned (The given array is too small. It must be at least 2 long) is the same I replicated passing a void array to MathNet.Numerics.Interpolate.Linear....

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello, did you try with an Adjust, to modify the inlet flow until you get the pressure (or pressure drops) you want? See attachment as an example. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello, the multiple vapor compression scheme has the objective to reduce the heat absorbed at low temperature and to increase the heat rejected at high temperature. This is done through a further liquid's expansion so that the evaporator has to evaporate at lower temperature less flowrate, i.e. the liquid fraction after the 2nd isenthalpic expansion. At the same time, the HP compressor receives hotter gas on suction as a mix of the cold and hot gas from LP compressor discharge, so that overall the...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello, The compressor #9 is specified to work with an outlet pressure of 25bar. Downstream all streams have 0 pressure drops, i.e. all stay at 25 bar. Eventually compressor #1 is specified to give an outlet pressure of 21.6 bar: it means inlet pressure 25, outlet 21.6, i.e. it is not a compressor but an expander hence negative power. If you don't specify pressure drops across the 2 loops, the system does not work properly. Try to specify e.g. dP/P = 2% across coolers and valves: then the compressor...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Victor, provided that a simulation model is in practice 'validated' only when compared with the actual performance guaranteed by combined cycle's OEMs, I'd suggest that you could benchmark your model's results with high level published data. In such a case, I'd start to compare the two-pressure levels HRSG temperature profile (a critical aspect in a CCGT design) with some literature papers: for instance this O. Bolland "A Comparative Evaluation of Advanced Combined Cycle Alternatives" (freely...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Felipe, I finally found some time to revise the gas filling model and to adapt it for the hydrogen cylinder filling (only). The attached model is based on the paper you referenced earlier and applies the Abel-Noble real gas EOS for H2. The heat transfer from H2 to the cylinder internal wall and from the external wall to the ambient is also simulated by solving the 1D heat diffusion equation discretized in time and space. The charts in the flowsheet show the profiles of cylinder pressure, temperature...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Nicholas, find attached my revision of your model, that now seems to converge. Some notes: 0. I suggest at first to model a Heat Xchanger with 2 equipment linked through the energy flow as it gives more flexibility. Later you can replace them with a full ST HE 1. Check on PT phase envelope in order to preliminarly establish the cycle's working points. I put here some rough figures as first attempt 2. When using pure water in your simulation always make use of Steam-Tables Thermo Package (instead...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello, see the attachment if it could be of help. I did not use a recycle block but 2 spec blocks to set the outlet throttling pressure and the recycled stream's vapor fractions. Seems you have to click Solve Flowsheet (F5) twice if you change the inlet parameters. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Felipe, sorry for this delayed answer. I checked your model and the referenced document. The main discrepancies in the results are of course due to: (a) the different thermo-package used in my file (Peng Robinson) and in the paper (Noble-Abel EOS for H2 ); (b) the heat exchanged through the cylinder's walls (neglected in my simulation). I am checking how to better represent the H2 gas behaviour during the cylinder charging and I hope to get back shortly with a revised model. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Victor, see attached a basic simulation of an HRSG steam drum. By varying the Heat Input's value (simulating the heat exchanged by GT flue gas) you have different amount of saturated steam exiting the boiler drum (here I assumed at 25 bar) Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Felipe, I revised the gas model, as I found that the assumption of ideal gas (ie U =Cv * T and H = Cp * T) to solve the transient in terms of gas temperature only, did not give me credible results. Therefore I changed the approach to solve the governing ODE by coupling the internal energy balance with the density balance and solving the non-linear equations system via the Simplex Optimization technique included in the MathNet.Numerics package. Attached is the revised model that I believe is...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Felipe, attached is a model I built to simulate the charging of a 100 litres cylinder with methane. Please have a look: model's details are described in the flowsheet and in the Python Script's comments. Let me know if you need any futher information. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Felipe, yes DWSIM directly supports Python scripts within its model. I'll get back to you with one sample of what I did, as soon as I am able to find some time. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Felipe, yes it is (I assume you are referring to gas flow charging a cylinder) . I did it with a Python script solving the differential equations given by the mass balance, possibly coupled with the gas flow pressure drops equation. Regarding the temperature profile, you can define if your process as slow enough to be considered an isothermal or fast to be an adiabatic process. In the latter you can solve the temperature profile through the non-steady heat balance taking also into account the...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Abdelkader, glad I could help. DWSIM being a general purpose simulator, likely could be used to simulate at least parts of a fueling station. Unfortunately I don't have experience on it, but if you have specific questions on how to model equipments or steady processes, I will try to support. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello! Did you try to model it with a flow splitter? If your flow goes in parallel to Storage and to Compression you can set the splitter's flow ratio. If your flow goes to Storage OR to Compression you can include a switch to divert the flow base on switch on/off. See attachment with the two possibilities (to run, remember to set it in Control Panel Mode). Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Pedro, I would consider a blower isentropic efficiency in the range 0.55 to 0.59 and calculate the polytropic efficiency as function of gas (cp/cv) and compression ratio (see attachment). Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Wow, it works indeed! Thanks Daniel. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Hello Daniel, I tried to use the button feature to run a script, but I'm not able to make it work (I use rel 7.3.1.): see attachment. What am I doing wrong there? Thanks a lot. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello, I would use a compressor with a polytropic efficiency of 0.58, correspondig approx to 0.57 isentropic efficiency considering air as handled fluid. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Dynamic Simulation

    Looks there is something wrong with the streams compositions. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    I suggest you to try the "Insert Snippet" feature in the DWSIM Script Manager tab. From there you can have the code lines to access all properties of both equipment and streams. Once created, a script can be automatically executed by linking it to specific event, such as before a component is calculated or the flowsheet's solver is started. For instance, in the example I uploaded, Script1 is linked to the solver start, i.e. every time you press the Solve Flowsheet button (or press F5) the Script1...

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    Hi, attached is my exercise. The common outlet pressure is specified in a spreadsheet's cell and a simple script is executed before the solver starts to set the outlet pressure to all compressors. It seems to work. Hope this helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    It is very unlikely that you can fully reproduce in DWSIM the heat exchanger datasheet. The properties used in the datasheet are taken from unknown sources and so are the margins used by HE manufacturer in design. So a certain gap between the datasheet and the simulation results is unavoidable. But the results' order of magnitude should be the same and if you want to verify this match with DWSIM there are some actions that you can take. First: if your cooling fluid is water, always use Steam Tables...

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    The condenser seems to have wrong pressure drops. Setting it to 5 psi the model works with SRK. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Vincent, try inserting virtuel_hum_out.CalcEquilibrium("PT", None) before virtuel_hum_out.Calculate(). This should fix the problem. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    George, in general for a known expander's outlet pressure the gas outlet absolute temperature is given by T2 = T1*(P2/P1)^((n-1)/n) where n is the polytropic coefficient. The generated power is then Pw = m * (h1-h2) * polytr_effcy Hope it helps Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Philippe, not sure to have understood in details your model. However attached is how I would approach the problem: use a (dummy) python UO with 2 input variables (the H2O and CH4 mol flows) passed by 2 spec blocks and a 3rd calculated variables being the mol ratio. The adjust then controls the ratio and manipulates the water inlet to meet the ratio setpoint. Hope this helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    Oops... you are right Frank ... not checked, my bad. This one attached should have water: convergence is not the best though ... Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Vincent, I suggest to change thermo package to SRK. For stream 16 I suggest to change flash spec to pres and enthalpy and for cool 2 to set calc type to outlet molar vapor fraction (eg 0.999) Here it works and starts to have liquid at 61 °C. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    Sorry ... typing too fast ... ... I saw you used PR for HC and water too. This likely will not work. Use SRK instead. However, looks there are two other inconsistencies: water enters SEP at atmospheric pressure while gas at 32 bar: you specified the flash at inlet minimum pressure (ie atmosperic), but downstream the cooler is specified with 1.38 bar pressure drops that cannot be. Furthermore you need to insert an energy recycle block to use back the energy from cooler into the separator. See the...

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    Hi Diego, I had the same error and the problem was the thermo package. I saw your

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    My rudimentary attempt to emulate a saturator: mixer and adjust on water flow until outlet vapor fraction is something <1. Found limitations: a) works only with Raoult Law; b) adjust works only with manual Control Panel mode. I'm sure there should be many smarter ways, maybe others could suggest. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Tommaso, I would use a Python script to modify the equilibrium as f(T) (or directly at outlet) and then let DWSIM to close the overall mass energy balance around the heat exchanger. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Tharun, yes I think that at a certain extent you can use DWSIM to model a heat recovery system and how it can increase the overall efficiency. In general, with a waste heat recovery system such as ORC you are using part of heat otherwise wasted, what makes your overall efficiency to increase. My suggestion is to start modeling in DWSIM your waste heat source, not in details but enough to include the main streams/variables definig its efficiency (eg for a boiler: fuel, air, flue-gas, water and...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Tharun, I'm afraid I didn't fully get your point. The ORC model you attached, correctly is the model of a cycle and as such you are recycling the condensate downstream the condenser to the feed-pump, such that you are closing the cycle. The recycle block is the UO used by DWSIM to close the mass & energy balances and simulates that your material stream is recycled from your process 'end point' to its 'starting point'. If you don't use the recycle block, you mean that your is not an Organic Rankine...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Understood. In this case, if the heat transferred from the inner pipe/coil is known and constant, the heat balance inside the outer pipe's fluid can be directly integrated and the gas temperature defined at the different positions along the exchanger. See the attached file where the pipe's dimensions are in Script1 and the heat input is the heater Energy stream. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Hi Lukas, you get a EOF error because your equation for r has some missing brackets. In your scripts you don't need to import Ri and Pi from the inlet stream as the partial pressures are directly passed, so use in the equations T, P, R1, R2 ... P1 P2. I run the model, but after quite long it failed ... so a closer look to the script expressions is needed. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Jonathan, don't know if this is your case, but your description seems to me as a pipe in pipe, or a jacketed pipe heat exchanger. If so, I would approach the model by linking a cooler (i.e. the inner pipe fluid that cools down) with a heater (i.e. the outer pipe fluid that absorbs heat): the 2 cooler are linked through the energy stream, i.e. the heat transferred from cooler to heater. Attached is a simplified model for cooling hydrogen in the inner pipe with water in the outer. You can change...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    I would suggest to use a spreadsheet block where you can simulate your reactor and make calculations of reactants conversion and/or directly define the oulet products flowrate. As an example you can have a look to the Electrolysis Cell with ExcelUO in the DWSIM samples. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Hi Patrik, it seems that there were some script's issues in assigning the outlet streams. See if the attached modified script suits you (I made only few temperatures changes checks). Hope this helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Power generation with turbine extraction for feedwater heater + external steam supply and water makeup (normally done in the condenser, not the open feewater heater). See the attachment for my rough translation. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    It makes sense to have that hard-coded limit on tsatW as above critical pressure there is no saturation temperature: the same check appears also in the excel function (see screen1); likely the problem is the DWSIM region definition based on tsat. In screen2 is how this is implemented in the excel function. Could it be replicated in DWSIM?

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Thanks Daniel. I went through the referenced vb code and found that the functions are the same as in the Excel VB functions. Actually the IAPWS functions work as expected when called directly, also for pressure above the critical (see screenshot of a script), so maybe is the DWSIM flash routine that does not work properly ... Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Daniel, I found that DWSIM has problem in calculating water properties above critical pressure (220 bar), see screenshot, in particular enthalpy. This is instead correctly calculated in other application using the same IAPWS formulation of steam tables (see screenshot) Any reason why DWSIM fails here? Thanks. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Tanatip, I checked your model v3 and I have the following comments on the Economizer (the internal heat exchanger COOLER+HEAT-02) and on the Condenser. 1) My first comment is about the specified pressure drops: in the COOLER you specified a DP of 0.9 bar and on the other side HEAT-02 0.03. Considering that the vapor on the turbine discharge flows on the COOLER's shell and the feed from the pumps's discharge inside tubes, I have the impression the two DPs should be exchanged (did you get them...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Tanatip. I ran your V2 model and it works well. See attached screenshot. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Tanatip, see if the attachment could be of help in setting your model. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Tanatip, depending upon the type of organic fluid and its conditions after the expansion in turbine, if it is still superheated vapor, the economizer should cool it down to saturated vapor (eg vapor fraction 0.99999) so that the condenser will remove only the latent heat. So in your simulation you could try to specify the UA and hot fluid outlet temperature as the saturation temperature at discharge pressure, or alternatively specify the removed heat until the outlet hot stream becomes saturated....

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Sivaraj, I'm not sure to have fully understood your question. However the ORC flowsheet I previously posted here was a full model of a 200 kW process including the hot-oil circuit for organic fluid evaporation, the regenerator on turbine discharge for fluid preheating and the cooling water circuit sent to the condenser. Regards. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Sivaraj, if your question is how to setup a model to replicate the process described in your post above, please have a look to the attachment. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Sivaraj, for details on how to build a simulation flowsheet in DWSim I recommend you to watch the youtube tutorials reachable from https://dwsim.inforside.com.br/wiki/index.php?title=Tutorials If you have instead specific questions on this ORC model, please let me know. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Daniel & Adrian, thank you both for your replies. @Daniel: actually I tried unsucccessfully to override the HE calculation routine trying to workaround the error but then I deleted the script because it failed: didn't imagine this was still triggered in the equipment. @Adrian: thanks for your model. Indeed my model is part of a verification of a power plant HP feedwater heater. Done on paper (or even in excel) this is pretty simple, with the simulator seems to be different story ... but I won't...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello everyone, in the attached model, the two Heat Exchangers do almost the same thing, but when solved, one returns the infamous error "HE-01 Object reference not set to an instance of an object" while the other is "almost" solved. Do anyone know what is wrong with these two HE? Thanks in advance. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Yes, sure you can replace the heat-losses cooler with a pipe element and let the simulator estimate the heat losses from the pipe.

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    You can include a cooler to simulate the heat losses. See attachment. HTH. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello, see attachment if it can be of help. Regards. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    Hi, don't know if this is the problem, but the HE-02 seems to have only 3 streams connected. Regards. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Daniel, if I want to change the model's calculation order, I can access it by means of Ctrl+Alt Solve and reorder the calc list. The new order however is not permanent and if I re-run the model I have again to access and reorder the calculation list. Is there any way to make permanent a custom calc order? In the attached model I tried running a script when the solver starts to load my calc order, and actually the modified calculation list is shown, but once displayed then the solver ignores it...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Thanks Daniel for the prompt reply. Meanwhile, how can I programmatically change the calculation order? I've noted the method Flowsheet.ChangeCalculationOrder requiring a list of strings but I could not find how to pass this list, always getting TypeError: expected List[str], got list Thanks in advance Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Daniel, when running rel 6.3u5 and trying to change calculation order (Ctrl+Alt + Solve Flowsheet) DWSim displays the attached error and crashes. This does not not happen with 6.3.u4. How could I fix it? Thanks. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Carlo, you entered only the power vs flow curve; if you want the compressor to be calculated by means of performance curves you have also to enter the head vs flow. Ciao. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Marco, your condenser is actually a 3-zones exchanger as at 2.9 bar_a the steam saturation temp is 132.4'C so you have appox 90'C superheating at inlet. For the same reason, if your specified condensate outlet temperature is 95'C you have approx 40'C subcooling. Therefore your exchanger behaves as a gas-liq cooler in the desuperheating zone from 220 to 132'C, as a condenser at 132'C and as a liq-liq exchanger to subcool condensate from 132 down to 95'C (neglecting pressure drops shell side). Each...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Thank you Daniel, great job. I tried to replicate your corrected model, but I couldn't. What was the trick? uca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Gregor, thank you very much for your detailed reply. I fully agree with your concept of distributing solids between the flashed liquid outlets according to their ratio as one possible option. However, when thinking to a flash tank in presence of solids I also have in mind a kind of solid settling effect to occur in the liquid phase(s) inside the separator as counterpart of the gas-liquid disengaging effect occurring in the vapor space. So, if I were to design it, in case of a single liquid...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Daniel, I have a problem with the attached simulation flashing a stream with solids. I created a compound (SiO2), forced the property package (NRTL) to treat as solid and used SVLE+Eutectic Flash algorithm. The inlet stream MSTR01 is correct and also the stream exiting the heater MSTR02 (for testing purpose I set dT= 0): in both streams there is one liquid and one solid phase and all SiO2 is in solid. In the flash tank liquid outlet (MSTR03) instead solid phase is not recognized and the in-out...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi aramin and Daniel, I've tried the model with this EoS package found at https://github.com/stevecalderone/Chemical-Engineering-Thermodynamics based on PR1978. Indeed the flash results are well aligned with DWsim with the 'reversed' streams compositions ... see attachments Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Ciao Simone, change the Independent Variable as Object: evaporatore Property: Heat Added (limits 2000-3500 kW for example) and Dependent Variable: espansore Power Generated. At my end it works. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Jouhnn, I replaced the CSTR with a conversion reactor and set in the reactions a fixed conversion 100% glycerol. Seems to work, check the attachment. Hope it helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Thanks for noting that, Frank; I did not realize it ... Could this imply convergence issues on PH flash in adiabatic?

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi Daniel and everyone in this forum, may I ask your help to understand what's wrong with the attached model? When run DWSim returns me the error CSTR01: Sequence contains no elements. It should work instead (on other simulator it does) with a conversion of approx 61% on nC4. Another questiom: in the reaction kinetic dialog,, how to specify that in the DO and in the RO reactions the base component is the reactant? Thanks in advance for any suggestion. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    Nice to read that you fixed already the issue! Thanks Daniel for your continuous efforts in improving your software! Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    Hello all, to hande 'rich' gas mixtures as the one included in Milan's model containing consistent amount of 'heavy' hydrocarbon (here 0.3 mol decane), it could be helpful to have implemented in DWSIM the Predictive Peng-Robinson EoS PPR78 as described in https://www.researchgate.net/publication/229996078_Predicting_the_Phase_Equilibria_of_Synthetic_Petroleum_Fluids_With_the_PPR78_Approach and On this EoS I found a nice implementation Excel VBA here https://github.com/stevecalderone/Chemical-Engineering-Thermodynamics...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Jaap, did you try to couple your preheater HEX model with a DWSim heater block (where you can better specify the outlet stream thermodynamic condtions ie at boiling point) and then add a spec (or an adjust) block linking the heater outlet temp to the HEX outlet temperature? This would avoid you the trial&error procedure of finding the boiling point ... Hope this helps. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello, how could this model work if you recycle the evaporator outlet to the comressor inlet? Unless the two streams R227 and R1234 are both zero, the overall mass balance does not close.... Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Leandro, here my suggestion for creating a Custom UO that can get the mass flows of the input streams. Insert a Python Script UO and attach some input streams. In the Python Script UO input screen click on 'Open Python Script Editor' and insert this fragment: mass_flows={} for cp in This.GraphicObject.InputConnectors: if cp.IsAttached: ms = cp.AttachedConnector.AttachedFrom.Tag obj = Flowsheet.GetFlowsheetSimulationObject(ms) mass_flows[ms] = obj.GetPhase('Overall').Properties.massflow # optional...

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Thanks Daniel for the explanation on obj.Calculate(). But what instead does the right-click + Recalculate? Yes, to run directly Script2 through Linq is a very useful suggestion. Thanks again. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Hello Daniel, I'd like to ask your help on the attached simulation (created in R6.2). I have an heater and a Custom Python-Script UO17 with 2 input variables W1 and W2. Since UO17 is not connected to other streams, it does not enter in the flowsheet calculation (Alt+Ctrl F5 ignores it) so I need a script to have it calculated. I wrote a Script1 linked to Solver-Start that takes a material stream's property, copies it in UO17 variable W1 and then activates the UO17 calculation through an obj.Calculate()....

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hi ChmEng, well I am not sure that there are inconsistencies in your simulation's Property Package. In my previous post, basically I wanted to note that checking the DeltaT across the HX by means of the average of the single cp at inlet and outlet, could be misleading. This because the cp_ave is a quantity derived from an heat input and the relevant change in temperature, ie cp = Q/(T2-T1) and this is the cp_ave between T1 and T2. This cp_ave may not be equal to the average of the individual cp_1...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello ChmEng, by definition the average heat capacity is the ratio between energy added or removed and the consequent change in temperature. So from your table, the cp_cold_in is the ratio between the enthalpy change from a reference state (H0,T0) and (H1,T1): cp_in = (H1 -H0)/(T1-T0), while cp_out is the ratio between (H0, T0) and (H2, T2): cp_out = (H2-H0)/(T2-T0). Solving for DT = (T2-T1) you can see that you can calculate the temperature change across the heater as 2kW divided by the average...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Leandro, I checked more carefully your original model & post and likely I misunderstood the problem (and hence my proposed solution). You have an input stream (Global Feed) specified with ratio H2:CO = 2:1 mol and another input stream (Reactor Outlet) specified with ratio H2:CO 2:1 mol (0.66 and 0.33 mol). You have also a Spec block that reads the CO mol flow in Feed, calculates the CO unreacted as 2% (0.02) and gives this value to the Reactor Outlet as CO mol flow. You expect that from the...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    If I understood the model well, I think you need to add an Adjust. In principle, the Spec Block reads the CO flow and calculates the H2 value Y=2X and gives this value as a setpoint (controlled property) to an Adjust (Controller Block). The Adjust in turn reads the feed to reactor (= controlled property) and manipulates the Recycle (or the Global Feed) to make it equal to the setpoint. Hope this could help. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    In DWSim I developed a rather basic python script for water hammer transient analysis due to fast closing of a manual valve downstream a reservoir (simple model: tank, pipe and manual valve) using the following articles: John Twyman Q. "Water hammer analysis using an implicit finite-difference method" Ingeniare. Revista chilena de ingeniería, vol. 26 Nº 2, 2018, pp. 307-318 Sepheran, Badri "Water Hammer Simulation by Implicit Finite Difference Scheme Using Non-Symmetrical Staggered Grid", Recent...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Carlo, attached is my approach. Firstly, I used SRK as thermo-model for ethanol and Steam Tables for the steam stream: with NRTL instead of SRK it did not work. Secondly, for a better use of their thermodynamic options, instead of using the Heat Exchanger model, I used a Cooler and an Heater in parallel, ie the cooler where steam condenses and an heater that warm the ethanol. The steam condenser in turns consists of 2 Coolers in series, the first where I set the vapor fraction outlet to 0.0001...

  • Luca Finardi Luca Finardi posted a comment on discussion Open Discussion

    Hello Aleksander, see this topic in this forum https://sourceforge.net/p/dwsim/discussion/844529/thread/08d967cd/?limit=25#1c16 where I posted a 200kW ORC example model that could be customized for your application. Hope it could be of help. Best regards. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Thanks Daniel. Though while setting this model (see my file in above post) I noticed a weird behaviour: solving the flowsheet after changing the functions Y=f(X) in spec blocks, specs recalculate Set Points but the Adj do not run the adjuster even if the Solve Globally is checked, so that I needed to open manually the Adj control panel and run the adjust routine. If I recall well, in previous versions (DWSIM 4.xx) this did not happen and the adjust were executed during simulation is the Solve Globally...

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Tanatip, you probably don't need a python script to fix your model. Attached is my approach. I've included a spec block Spec-016 that takes the power to run the compressor Comp-001 and gives a power set point to an adjuster Adj-019 that manipulates the heat input to the combustor Heat-002 in such a way the gas turbine Exp-003 generates enough power to drive the compressor C-001. Then I included the spec block Spec-014 that takes the power output of the gas turbine Exp-003 and calculates a power set...

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    In principle yes, you could access the reaction(s) kinetic parameters through a script and 'dynamically' change them. For an first outlook on how the parameters are handled inside DWSim and how you can access them , have a look at this code https://github.com/DanWBR/dwsim5/blob/windows/DWSIM.UnitOperations/Reactors/CSTR.vb#L126 On the specific topic of the conversion calcualtion, refer to a recent thread in the Help section as Daniel is fixing for DW rel 5.8 a current inconsistency in the UOM conversion....

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Well, the scheme is pretty the same as for the material streams, i.e. # compressor mycomp = Flowsheet.GetFlowsheetSimulationObject('COMP-012') print dir(mycomp) # heat exchanger myHE = Flowsheet.GetFlowsheetSimulationObject('HE-013') print dir(myHE) # CSTR reactor cstr = Flowsheet.GetFlowsheetSimulationObject('CSTR-001') print dir(cstr) However sometime, to retrieve useful parameters you need dig into the properties of subobjects but to understand in which and where, you need to go through the source...

  • Luca Finardi Luca Finardi posted a comment on discussion Python Scripting

    Hi Patrick, One basic way to see the available parameters for example in one stream is to list object properties through the command dir(). Example: water_in = Flowsheet.GetFlowsheetSimulationObject("Water_EtOH_Stream") OverallProp = water_in.GetPhase('Overall').Properties print dir(OverallProp) or for components composition EtOHProp = water_in.GetPhase('Overall').Compounds['Ethanol'] print dir(EtOHProp) you can use either GetPhase('Liquid') or GetPhase('Vapor') to retrieve the parameters in the...

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Great job Daniel! Though I tried to input in the reaction your values (i.e. preexponential factor in 1/h, activation energy in j/mol K (??) and units in US units) I couldn't find the good results shown in your screenshots. No problems, I will wait until the full fix in rel 5.8. Thanks. Luca

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Sorry, I did'nt get correctly. In the kinectic reaction panel the k basis is set already to molar concentrations.

  • Luca Finardi Luca Finardi posted a comment on discussion Help (Classic UI)

    Hello Daniel, I tried to replicate this Propylene Glycol CSTR. The attached model works but I found inconsistency in conversion calculation. In CSTR isothermal mode at 24'C model calculates Propylene-Oxide conversion Z(24) = 99.883 %; in outlet temperature mode at 60'C Z(60) = 99.995%. I checked here https://github.com/DanWBR/dwsim5/blob/windows/DWSIM.UnitOperations/Reactors/CSTR.vb#L536 the kinetcs constants k calculation and they look ok: k(24) = 0.9432 1/h and k(60) = 25.60 1/h so that hand calculating...

1 >