Skip to content

[Bug] Solver issue with PFR using CAPE-OPEN propeties package #1076

@GG-92kj

Description

@GG-92kj

I'm trying to simulate the Haber-Bosch process which operates at high temperature and pressure. Since DWSIM does not have the Boston-Mathias SRK typically recommended to account for the non-ideality of ammonia at high pressure, I am trying using the Mathias-Copeman SRK package found in ChemSep, incorporating it into DWSIM as a CAPE-OPEN package. The CAPE-OPEN implementation seems to work just fine when performing flash calculations, i.e. through a gas-liquid separator.

However, when I try to perform the ammonia synthesis reaction, I get a solver error. The kinetic model used is from Froment and Bischoff (taken from 10.1016/j.compchemeng.2008.03.001), and it works just fine when using DWSIM property packages like SRK or PR. It does not work when I switch to any CAPE-OPEN property package (whether MC-SRK or just regular SRK), giving me the message: System.Exception: PFR ODE solver failed to find a solution. at DWSIM.UnitOperations.Reactors.Reactor_PFR.ODEFunc(Double x, Double[] y) in C:\Users\danie\source\repos\DanWBR\dwsim\DWSIM.UnitOperations\Reactors\PFR.vb:line 492.

I tried toying around with the length of the integration steps or changing the solver type without any success.

To Reproduce
MC-SRK.zip

  1. Open the Thermodynamics tab of the Settings menu.
  2. Configure the MC-SRK CAPE-OPEN Property Package.
  3. Using the Thermo Interface 1.1, select ChemSep as manager.
  4. Load MC-SRK (file attached), save in the ChemSep interface.
  5. Make sure that the compound and phase mapping are all OK.
  6. Confirm that the package works well by solving stream 1 with the MC-SRK package. (If it doesn't turn blue, the package isn't properly configured.)
  7. Run the whole simulation. It should result in an error.
  8. Confirm that this is limited to the MC-SRK package by switching the PP of all units to SRK or PR.

Desktop:

  • OS: Windows
  • Version v9.0.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions