Skip to content

Commit

Permalink
fixed issue #410
Browse files Browse the repository at this point in the history
  • Loading branch information
DanWBR committed Dec 22, 2022
1 parent 1ba2fe1 commit 3ddff35
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DWSIM.Thermodynamics/FlashAlgorithms/NestedLoops.vb
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,12 @@ Namespace PropertyPackages.Auxiliary.FlashAlgorithms
If g > 0 Then Vmin = V Else Vmax = V


V = Brent.BrentOpt3(0.0, 1.0, 10, 0.001, 100,
V = Brent.BrentOpt3(Vmin, Vmax, 10, 0.001, 100,
Function(Vb)
Return Vz.MultiplyY(Ki.AddConstY(-1).DivideY(Ki.AddConstY(-1).MultiplyConstY(Vb).AddConstY(1))).SumY
End Function)


'V = Vmin + (Vmax - Vmin) / 2
If V > 1.0 Or V < 0.0 Then V = Vmin + (Vmax - Vmin) / 2

L = 1 - V

Expand Down
119 changes: 119 additions & 0 deletions DWSIM.XFlowsheet/ClassDiagram1.cd
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1" MembersFormat="NameAndType">
<Interface Name="XFlowsheet.Interfaces.IConnectionPort">
<Position X="17.75" Y="3" Width="3" />
<TypeIdentifier>
<HashCode>AAgAAAQAAAQggABAAAAAAAQQAAAgAAAAAAEAAAAAEAA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="XFlowsheet.Interfaces.IPFDObject">
<Position X="12" Y="3.75" Width="3" />
<TypeIdentifier>
<HashCode>AAAAAAAABAAggAAABAAEAEQCAAAAAAAAAIAAAAAAYAA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="ObjectType" />
</ShowAsAssociation>
<ShowAsCollectionAssociation>
<Property Name="Ports" />
</ShowAsCollectionAssociation>
</Interface>
<Interface Name="XFlowsheet.Interfaces.ISimulationObject">
<Position X="6" Y="7" Width="2.75" />
<TypeIdentifier>
<HashCode>AAAQAACAAAAggAAAAAAAIAQAAAAAAAAAAIAAAAAAAAA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="ObjectType" />
</ShowAsAssociation>
<ShowAsCollectionAssociation>
<Property Name="Parameters" />
<Property Name="ExtendedParameters" />
</ShowAsCollectionAssociation>
</Interface>
<Interface Name="XFlowsheet.Interfaces.IPropertyPackage">
<Position X="2.75" Y="4" Width="1.75" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAggAAAAAAAAAQAAAAAAAAAAIgAAAAAAAA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Model" />
</ShowAsAssociation>
<ShowAsCollectionAssociation>
<Property Name="Parameters" />
</ShowAsCollectionAssociation>
</Interface>
<Interface Name="XFlowsheet.Interfaces.IFlowsheet">
<Position X="7.25" Y="4.25" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAIAAAAACAggAAAAAQAAAQAAAAACAAAAICAAAAAAAA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="DisplayedUnitsOfMeasure" />
</ShowAsAssociation>
<ShowAsCollectionAssociation>
<Property Name="SimulationObjects" />
<Property Name="PFDObjects" />
<Property Name="PropertyPackages" />
<Property Name="Parameters" />
</ShowAsCollectionAssociation>
</Interface>
<Interface Name="XFlowsheet.Interfaces.IParameter">
<Position X="1.25" Y="7.25" Width="1.75" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAggAAAAAAAAAQAAAAAAAAAAAAgAAAAEAA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="ValueType" />
</ShowAsAssociation>
</Interface>
<Interface Name="XFlowsheet.Interfaces.IUnitsOfMeasure" Collapsed="true">
<Position X="18.25" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>SQAAAAHFAAAhg4AAAAAQIDRhBAAC4BBIABYtAwKMgRE=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
</Interface>
<Enum Name="XFlowsheet.Interfaces.UnitOfMeasureSet">
<Position X="7.5" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAABAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAABAAAA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="XFlowsheet.Interfaces.UnitOfMeasure" Collapsed="true">
<Position X="18.25" Y="1.5" Width="1.5" />
<TypeIdentifier>
<HashCode>QQAIAAHlAAABAoAAAAAYIBABBAAi4BBIAB4FA0OMARA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="XFlowsheet.Interfaces.PropPackageModel">
<Position X="2.25" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>ABAAAAAABAAAAAQBAAIAAEAAAAAgAEAACAEAAAEAAAA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="XFlowsheet.Interfaces.ParamValueType">
<Position X="1.25" Y="10.5" Width="1.5" />
<TypeIdentifier>
<HashCode>IAAAgBAAQAAAEEAAKAAAKAAAACABQAACgQgAAEQBBIA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="XFlowsheet.Interfaces.ObjType">
<Position X="10.25" Y="8" Width="1.5" />
<TypeIdentifier>
<HashCode>CAgEAAACAAAAAAAAgEEAAAACIIAAAAQAAABAAAAAAAA=</HashCode>
<FileName>Interface.vb</FileName>
</TypeIdentifier>
</Enum>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>
1 change: 1 addition & 0 deletions DWSIM.XFlowsheet/DWSIM.XFlowsheet.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="ClassDiagram1.cd" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
Expand Down

0 comments on commit 3ddff35

Please sign in to comment.