Components.LEV
Linear Electronic Expansion Valve (LEV).
m_flow > 0 means flow enters through port_a. input_position is the commanded valve position; its mapping to flow coefficient is set by the (theta, thresh) arrays (lengths NTheta, NThresh) together with the overall Cv scale ZCv.
Usage
HVACComponents.Components.LEV(medium_data, ZCv, dp_small, theta, thresh, x_t, yd0, LEV_position_start, p_a_start, m_flow_start, h_in_start, p_b_start, h_out_start, dp_start=p_a_start - p_b_start, rho_start=HVACComponents.Density_ph(p_a_start, h_in_start, medium_data), rho_a_start=HVACComponents.Density_ph(p_a_start, h_in_start, medium_data), rho_b_start=HVACComponents.Density_ph(p_b_start, h_out_start, medium_data))
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
NTheta | Number of polynomial segments in the CvLookup correlation | – | 3 |
NThresh | Number of breakpoints in the CvLookup correlation | – | 3 |
use_yd0 | If true, use yd0 as the regularization constant for the pressure-drop branch | – | false |
medium_data | Refrigerant medium properties | – | |
ZCv | Overall Cv scaling factor for the valve [-] | – | |
dp_small | Pressure-drop regularization scale [Pa] | – | |
theta | CvLookup polynomial coefficients keyed to valve position (length NTheta) | – | |
thresh | CvLookup breakpoint thresholds keyed to valve position (length NThresh) | – | |
x_t | Choked-flow pressure-ratio limit used inside the orifice correlation | – | |
yd0 | Optional y-axis offset for the pressure-drop regularization | – | |
LEV_position_start | Initial valve position [-] (solver guess) | – | |
p_a_start | Initial inlet pressure [Pa] (solver guess) | – | |
m_flow_start | Initial mass flow [kg/s] (solver guess) | – | |
h_in_start | Initial inlet specific enthalpy [J/kg] | – | |
p_b_start | Initial outlet pressure [Pa] (solver guess) | – | |
h_out_start | Initial outlet specific enthalpy [J/kg] | – | |
dp_start | Initial pressure drop [Pa] (= p_a_start - p_b_start) | – | p_a_start - p_b_start |
rho_start | Initial upstream density [kg/m^3] (= Density_ph(p_a_start, h_in_start)) | – | HVACComponents.Density_ph(p_a_start, h_in_start, medium_data) |
rho_a_start | Initial port_a-side density [kg/m^3] | – | HVACComponents.Density_ph(p_a_start, h_in_start, medium_data) |
rho_b_start | Initial port_b-side density [kg/m^3] | – | HVACComponents.Density_ph(p_b_start, h_out_start, medium_data) |
Connectors
input_position- This connector represents a real signal as an input to a component (RealInput)port_a- (FluidPort)port_b- (FluidPort)
Variables
| Name | Description | Units |
|---|---|---|
u_in | Commanded valve position [-] | – |
m_flow | Mass flow through the valve, positive into port_a [kg/s] | – |
rho | Upstream density used by the orifice equation [kg/m^3] | – |
rho_a | Density at port_a inflow conditions [kg/m^3] | – |
rho_b | Density at port_b inflow conditions [kg/m^3] | – |
dp | Pressure drop port_a - port_b [Pa] | – |