Escolar Documentos
Profissional Documentos
Cultura Documentos
Interface to
Component
Your
VapCyc Performance
Component
Data/Library/DLL
DLL
8
Introduction to VapCyc® Standard
Standardized
Framework
“Followed” by all
component models
VapCyc
Solver Component
models Enable solver-
component
communication
Independent Properties
Inlet Outlet
Port(s) Port(s)
• Pin Component • Pout
• hin Model • hout
• Tin • Tout
• xin • xout
• 𝒎𝒎̇ • 𝒎𝒎̇
Dependent Properties
For both
Inputs and
B Inlet Outlet Outputs,
Port(s) Component Port(s) user-
• Pin • Pout Component
• hin Model (e.g. • hout MUST use
compressor, exp. (P,T,x)
• Tin • Tout
• xin device) • xout
• 𝒎𝒎̇ • 𝒎𝒎̇
Pressure-Based Boundary Condition
15
Component Lifetime
Initializes fluid groups, boundary condition Initialize
type, property folder paths, independent VapCyc® Component
and dependent properties etc. Initialization
Loads Component State & Independent Initialize Component
Properties from file Load/Save
Load Component State
Provides Modal UI dialog for users to
change the Independent Properties Edit Component User
Parameters Interface
Sets information for the property routine
library required for model execution. Set Property
Routine Property
Provides the option to conduct pre-
Routine Setup
processing prior the component model
execution. Begin Simulation 2
Executes the underlying Component Pre- /Post-
Run Component Process
model code (or calls other relevant codes). 1
Provides the option to conduct post-
processing after the simulation ends, but End Simulation Model
Execution
before the Component output is accessed.
Saves Independent Properties of the Save Cycle
Component
component to an XML node. Termination
Terminate Component
Save/Load
User
Interface
Property
Routine Setup
Pre- and
post-process
Model
Execution
Component
Termination
Copyright© 2018 Center for Environmental Energy Engineering, University of Maryland.
17
Component Initialization
Component
Initialization
LoadState
The method loads component state including Independent Properties of
the component from an XML node
stateNode is an XML node storing component Independent Properties. It
is essentially the same XML node created by the Component Model
when the SaveState method is called
SaveState
The method saves the component properties to an XML Node and
returns the Node
The Cycle/Solver takes this Node and appends it to a list of nodes for
saving/loading of components. The Component Model code may choose
to encrypt the contents of this node.
The Component Model code must also ensure backward compatibility
when making updates to Component Models
Copyright© 2018 Center for Environmental Energy Engineering, University of Maryland.
19
User Interface
User
Interface
This method is mainly used to facilitate User Interaction through a graphical
user interface
Upon invocation, the component model ideally displays a modal dialog
where the user can change the independent properties and any other
relevant parameters of the component
May include any Branding or Licensing information
BeginSimulation
Notifies the Component that the simulation is about to commence. The
Component can use this event to conduct any initializations etc.
Can be called multiple times during the component lifetime
May choose to clear the Message List
EndSimulation
Notifies the Component that the simulation has ended
status argument informs the component about how the simulation ended,
e.g., successful, failed etc.; Component may use this information for post
processing
Can be called multiple times during the component lifetime
27
Heat Load-based HX
Q Mass flow rate-based
Pin, hin, 𝑚𝑚̇ 𝑖𝑖𝑖𝑖
Boundary Condition type
∆Tsat Independent Properties
Pout, hout, 𝑚𝑚̇ 𝑜𝑜𝑜𝑜𝑜𝑜 Heat load (+, -)
Saturation temperature
VapCyc® Standard drop
VapCyc® Solver
NLSolver
30
Component Tester
1. Use Browse to load the DLL of
the user component.
1
2. Select the component model
3 from the list.
2 3. Click at initialize to initialize the
component and select appropriate
BC (Boundary Condition) type.
4. Click at Edit Component to
5 invocate the component user
interface and specify the
component Independent
Properties.
5. Provide refrigerant information
4 6 and inlet refrigerant states.
6. Click at Run for execution
results.
35