Temperature Control Valve (G)

Valve with inlet thermostat to regulate flow

  • Library:
  • Simscape / Fluids / Gas / Valves & Orifices / Flow Control Valves

Description

The Temperature Control Valve (G) block models an orifice with a thermostat as a flow control mechanism. The thermostat contains a temperature sensor and a black-box opening mechanism—one whose geometry and mechanics matter less than its effects. The sensor is at the inlet and it responds with a slight delay, captured by a first-order time lag, to variations in temperature.

When the sensor reads a temperature in excess of a preset activation value, the opening mechanism is actuated. The valve begins to open or close, depending on the chosen operation mode—the first case corresponding to a normally closed valve and the second to a normally open valve. The change in opening area continues up to the limit of the valve's temperature range, beyond which point the opening area is a constant. Within the temperature range, the opening area is a linear function of temperature.

The flow can be laminar or turbulent, and it can reach (up to) sonic speeds. This happens at the vena contracta, a point just past the throat of the valve where the flow is both its narrowest and fastest. The flow then chokes and its velocity saturates, with a drop in downstream pressure no longer sufficing to increase its velocity. Choking occurs when the back-pressure ratio hits a critical value characteristic of the valve. Supersonic flow is not captured by the block.

Control Temperature

The temperature reading at the inlet serves as the control signal for the valve. The greater its rise over the activation temperature, the more the opening area diverges from its normal state—maximally closed in the default Valve operation setting of Opens above activation temperature, fully open in the alternative setting.

The difference between the sensor temperature reading and the activation temperature is referred to here as the temperature overshoot. For use in the block calculations, this variable is normalized against the temperature regulation range of the valve (that over which the opening area is variable). Its value is computed in this (normalized) form using the expression:

T^=TSTAΔT,

where T is temperature. The overhead ^ symbol denotes its normalized value while the subscripts S and A indicate the inlet sensor reading and the activation value (a constant obtained from the block parameter of the same name). The difference ΔT is the temperature regulation of the valve (it too obtained from a block parameter of the same name).

Sensor Dynamics

To emulate a real temperature sensor, which can register a shift in temperature only gradually, the block adds a first-order time lag to the temperature reading, TS. The lag gives the sensor a transient response to variations in temperature. This response is captured in the expression:

ddtTS=TInTSτ,

where τ is the time required for the sensor to register a step change in temperature. Its value is obtained from the Sensor time constant block parameter. The smaller it is, the faster the sensor responds. The subscript In denotes the actual inlet temperature at the current time step of the simulation.

Numerical Smoothing

The normalized temperature overshoot spans three pressure regions. Below the activation temperature, its value is a constant zero. Above the maximum temperature—the sum of the activation temperature and the temperature regulation range—it is 1. In between, it varies, as a linear function of the temperature sensor reading, TS.

The transitions between the regions are sharp and their slopes discontinuous. These pose a challenge to variable-step solvers (the sort commonly used with Simscape models). To precisely capture discontinuities, referred to in some contexts as zero crossing events, the solver must reduce its time step, pausing briefly at the time of the crossing in order to recompute its Jacobian matrix (a representation of the dependencies between the state variables of the model and their time derivatives).

This solver strategy is efficient and robust when discontinuities are present. It makes the solver less prone to convergence errors—but it can considerably extend the time needed to finish the simulation run, perhaps excessively so for practical use in real-time simulation. An alternative approach, used here, is to remove the discontinuities altogether.

Normalized temperature overshoot with sharp transitions

To remove the slope discontinuities, the block smoothes them over a small portion of the opening curve. The smoothing, which adds a slight distortion at each transition, ensures that the valve eases into its limiting positions rather than snap (abruptly) into them. The smoothing is optional: you can disable it by setting its time scale to zero. The shape and scale of the smoothing, when applied, derives in part from the cubic polynomials:

λL=3T¯L22T¯L3

and

λR=3T¯R22T¯R3,

where

T¯L=T^ΔT*

and

T¯R=T^(1ΔT*)ΔT*.

In the equations:

  • ƛL is the smoothing expression for the transition from the maximally closed position.

  • ƛR is the smoothing expression for the transition from the fully open position.

  • Δp* is the (unitless) characteristic width of the temperature smoothing region:

    ΔT*=f*12,

    where f* is a smoothing factor valued between 0 and 1 and obtained from the block parameter of the same name.

    When the smoothing factor is 0, the normalized temperature overshoot stays in its original form—no smoothing applied—and its transitions remain abrupt. When it is 1, the smoothing spans the whole of the temperature regulation range (with the normalized temperature overshoot taking the shape of an S-curve).

    At intermediate values, the smoothing is limited to a fraction of that range. A value of 0.5, for example, will smooth the transitions over a quarter of the temperature regulation range on each side (for a total smooth region of half the regulation range).

The smoothing adds two new regions to the normalized temperature overshoot—one for the smooth transition on the left, another for that on the right, giving a total of five regions. These are expressed in the piecewise function:

T^*={0,T^0T^λL,T^<ΔT*T^,T^1ΔT*T^(1λR)+λR,T^<11T^1,

where the asterisk denotes a smoothed variable (the normalized temperature overshoot). The figure shows the effect of smoothing on the sharpness of the transitions.

Sonic Conductance

As the opening area varies during simulation, so does the mass flow rate through the valve. The relationship between the two variables, however, is indirect. The mass flow rate is defined in terms of the valve's sonic conductance and it is this quantity that the opening area truly determines.

Sonic conductance, if you are unfamiliar with it, describes the ease with which a gas will flow when it is choked—when its velocity is at its theoretical maximum (the local speed of sound). Its measurement and calculation are covered in detail in the ISO 6358 standard (on which this block is based).

Only one value is commonly reported in valve data sheets: one taken at steady state in the fully open position. This is the same specified in the block dialog box (when the Valve parameterization setting is Sonic conductance). For values across the opening range of the valve, this maximum is scaled by the (normalized) valve opening area:

C(S)=SSMaxCMax,

where C is sonic conductance and the subscript Max denotes the specified (manufacturer's) value. The sonic conductance varies linearly between CMax in the fully open position and SLeak÷SMax×CMax in the maximally closed position—a value close to zero and due only to internal leakage between the ports.

Other Parameterizations

Because sonic conductance may not be available (or the most convenient choice for your model), the block provides several equivalent parameterizations. Use the Valve parameterization drop-down list to select the best for the data at hand. The parameterizations are:

  • Restriction area

  • Sonic conductance

  • Cv coefficient (USCS)

  • Kv coefficient (SI)

The parameterizations differ only in the data that they require of you. Their mass flow rate calculations are still based on sonic conductance. If you select a parameterization other than Sonic conductance, then the block converts the alternate data—the (computed) opening area or a (specified) flow coefficient—into an equivalent sonic conductance.

Flow Coefficients

The flow coefficients measure what is, at bottom, the same quantity—the flow rate through the valve at some agreed-upon temperature and pressure differential. They differ only in the standard conditions used in their definition and in the physical units used in their expression:

  • Cv is measured at a generally accepted temperature of 60 ℉ and pressure drop of 1 PSI; it is expressed in imperial units of US gpm. This is the flow coefficient used in the model when the Valve parameterization block parameter is set to Cv coefficient (USCS).

  • Kv is measured at a generally accepted temperature of 15 ℃ and pressure drop of 1 bar; it is expressed in metric units of m3/h. This is the flow coefficient used in the model when the Valve parameterization block parameter is set to Kv coefficient (SI).

Sonic Conductance Conversions

If the valve parameterization is set to Cv Coefficient (USCS), the sonic conductance is computed at the maximally closed and fully open valve positions from the Cv coefficient (SI) at maximum flow and Cv coefficient (SI) at leakage flow block parameters:

C=(4×108Cv)m3/(s Pa),

where Cv is the flow coefficient value at maximum or leakage flow. The subsonic index, m, is set to 0.5 and the critical pressure ratio, bcr, is set to 0.3. (These are used in the mass flow rate calculations given in the Momentum Balance section.)

If the Kv coefficient (SI) parameterization is used instead, the sonic conductance is computed at the same valve positions (maximally closed and fully open) from the Kv coefficient (USCS) at maximum flow and Kv coefficient (USCS) at leakage flow block parameters:

C=(4.758×108Kv)m3/(s Pa),

where Kv is the flow coefficient value at maximum or leakage flow. The subsonic index, m, is set to 0.5 and the critical pressure ratio, bcr, is set to 0.3.

For the Restriction area parameterization, the sonic conductance is computed (at the same valve positions) from the Maximum opening area, and Leakage area block parameters:

C=(0.128×4S/π)L/(s bar),

where S is the opening area at maximum or leakage flow. The subsonic index, m, is set to 0.5 while the critical pressure ratio, bcr is computed from the expression:

0.41+0.272[T^(SUSL)+SLS]0.25,

where S is the valve opening area and the subscripts U and L denote its values at the upper (U) and lower (L) bounds of the temperature regulation range. These depend on the setting of the Valve operation parameter (Opens above activation temperature or Closes above activation temperature).

Momentum Balance

The causes of those pressure losses incurred in the passages of the valve are ignored in the block. Whatever their natures—sudden area changes, flow passage contortions—only their cumulative effect is considered during simulation. This effect is assumed to reflect entirely in the sonic conductance of the valve (or in the data of the alternate valve parameterizations).

Mass Flow Rate

When the flow is choked, the mass flow rate is a function of the sonic conductance of the valve and of the thermodynamic conditions (pressure and temperature) established at the inlet. The function is linear with respect to pressure:

m˙ch=Cρ0pinT0Tin,

where:

  • C is the sonic conductance inside the valve. Its value is obtained from the block parameter of the same name or by conversion of other block parameters (the exact source depending on the Valve parameterization setting).

  • ρ is the gas density, here at standard conditions (subscript 0), obtained from the Reference density block parameter.

  • p is the absolute gas pressure, here corresponding to the inlet (in).

  • T is the gas temperature at the inlet (in) or at standard conditions (0), the latter obtained from the Reference temperature block parameter.

When the flow is subsonic, and therefore no longer choked, the mass flow rate becomes a nonlinear function of pressure—both that at the inlet as well as the reduced value at the outlet. In the turbulent flow regime (with the outlet pressure contained in the back-pressure ratio of the valve), the mass flow rate expression is:

m˙tur=Cρ0pinT0Tin[1(prbcr1bcr)2]m,

where:

  • pr is the back-pressure ratio, or that between the outlet pressure (pout) and the inlet pressure (pin):

    Pr=poutpin

  • bcr is the critical pressure ratio at which the flow becomes choked. Its value is obtained from the block parameter of the same name or by conversion of other block parameters (the exact source depending on the Valve parameterization setting).

  • m is the subsonic index, an empirical coefficient used to more accurately characterize the behavior of subsonic flows. Its value is obtained from the block parameter of the same name or by conversion of other block parameters (the exact source depending on the Valve parameterization setting).

When the flow is laminar (and still subsonic), the mass flow rate expression changes to:

m˙lam=Cρ0pin[1pr1blam]T0Tin[1(blambcr1bcr)2]m

where blam is the critical pressure ratio at which the flow transitions between laminar and turbulent regimes (obtained from the Laminar flow pressure ratio block parameter). Combining the mass flow rate expressions into a single (piecewise) function, gives:

m˙={m˙lam,blampr<1m˙tur,bcrpr<plamm˙ch,pr<bCr,

with the top row corresponding to subsonic and laminar flow, the middle row to subsonic and turbulent flow, and the bottom row to choked (and therefore sonic) flow.

Mass Balance

The volume of fluid inside the valve, and therefore the mass of the same, is assumed to be very small and it is, for modeling purposes, ignored. As a result, no amount of gas can accumulate there. By the principle of conservation of mass, the mass flow rate into the valve through one port must therefore equal that out of the valve through the other port:

m˙A+m˙B=0,

where m˙ is defined as the mass flow rate into the valve through port A or B. Note that in this block the flow can reach but not exceed sonic speeds.

Energy Balance

The valve is modeled as an adiabatic component. No heat exchange can occur between the gas and the wall that surrounds it. No work is done on or by the gas as it traverses from inlet to outlet. With these assumptions, energy can flow by advection only, through ports A and B. By the principle of conservation of energy, the sum of the port energy flows must then always equal zero:

ϕA+ϕB=0,

where ϕ is defined as the energy flow rate into the valve through one of the ports (A or B).

Ports

Conserving

expand all

Opening through which the working fluid can enter or exit the valve. The direction of flow depends on the pressure differential established across the valve. Both forward and backward directions are allowed.

Opening through which the working fluid can enter or exit the valve. The direction of flow depends on the pressure differential established across the valve. Both forward and backward directions are allowed.

Parameters

expand all

Basic Parameters

Sign of the change in opening area induced by warming. The opening area can expand with a rise in temperature or it can contract. The change begins at an activation temperature and continues with warming conditions throughout the temperature regulation range of the valve.

The default setting corresponds to a normally closed valve that opens with rising temperature; the alternative setting corresponds to a normally open valve that closes with the same.

Temperature at which the opening mechanism is triggered. Warming above this temperature will either open or close the valve, depending on the setting of the Valve operation parameter. The opening area remains variable throughout the temperature regulation range of the valve.

Span of the temperature interval over which the valve opening area varies with temperature. The interval begins at the activation temperature of the valve; it ends at the sum of the same with the regulation range specified here.

Characteristic time for a temperature change to register at the inlet sensor. This parameter determines the delay between the onset of a change and a stable measurement of the same (taken as the sensor nears its new steady state). A value of 0 means that the sensor responds instantaneously to a temperature change.

Choice of ISO method to use in the calculation of mass flow rate. All calculations are based on the Sonic conductance parameterization; if a different option is selected, the data specified in converted into equivalent sonic conductance, critical pressure ratio, and subsonic index. See the block description for more information on the conversion.

This parameter determines which measures of valve opening you must specify—and therefore which of those measures appear as parameters in the block dialog box.

Area normal to the flow path at the valve ports. The ports are assumed to be the same in size. The flow area specified here should ideally match those of the inlets of adjoining components.

Pressure ratio at which the flow transitions between laminar and turbulent flow regimes. The pressure ratio is the fraction of the absolute pressure downstream of the valve over that just upstream of it. The flow is laminar when the actual pressure ratio is above the threshold specified here and turbulent when it is below. Typical values range from 0.995 to 0.999.

Absolute temperature used at the inlet in the measurement of sonic conductance (as defined in ISO 8778).

Gas density established at the inlet in the measurement of sonic conductance (as defined in ISO 8778).

Model Parameterization Tab

Equivalent measure of the maximum flow rate allowed through the valve at some reference inlet conditions, generally those outlined in ISO 8778. The flow is at a maximum when the valve is fully open and the flow velocity is choked (it being saturated at the local speed of sound). This is the value generally reported by manufacturers in technical data sheets.

Sonic conductance is defined as the ratio of the mass flow rate through the valve to the product of the pressure and density upstream of the valve inlet. This parameter is often referred to in the literature as the C-value.

Dependencies

This parameter is active and exposed in the block dialog box when the Valve parameterization setting is Sonic conductance.

Equivalent measure of the minimum flow rate allowed through the valve at some reference inlet conditions, generally those outlined in ISO 8778. The flow is at a minimum when the valve is maximally closed and only a small leakage area—due to sealing imperfections, say, or natural valve tolerances—remains between its ports.

Sonic conductance is defined as the ratio of the mass flow rate through the valve to the product of the pressure and density upstream of the valve inlet. This parameter is often referred to in the literature as the C-value.

This parameter serves primarily to ensure that closure of the valve does not cause portions of the gas network to become isolated (a condition known to cause problems in simulation). The exact value specified here is less important that its being a (very small) number greater than zero.

Dependencies

This parameter is active and exposed in the block dialog box when the Valve parameterization setting is Sonic conductance.

Ratio of downstream to upstream absolute pressures at which the flow becomes choked (and its velocity becomes saturated at the local speed of sound). This parameter is often referred to in the literature as the b-value. Enter a number greater than or equal to zero and smaller than the Laminar flow pressure ratio block parameter.

Dependencies

This parameter is active and exposed in the block dialog box when the Valve parameterization setting is Sonic conductance.

Empirical exponent used to more accurately calculate the mass flow rate through the valve when the flow is subsonic. This parameter is sometimes referred to as the m-index. Its value is approximately 0.5 for valves (and other components) whose flow paths are fixed.

Dependencies

This parameter is active and exposed in the block dialog box when the Valve parameterization setting is Sonic conductance.

Flow coefficient of the fully open valve, expressed in the US customary units of ft3/min (as described in NFPA T3.21.3). This parameter measures the relative ease with which the gas will traverse the valve when driven by a given pressure differential. This is the value generally reported by manufacturers in technical data sheets.

Dependencies

This parameter is active and exposed in the block dialog box when the Valve parameterization setting is Cv coefficient (USCS).

Flow coefficient of the maximally closed valve, expressed in the US customary units of ft3/min (as described in NFPA T3.21.3). This parameter measures the relative ease with which the gas will traverse the valve when driven by a given pressure differential.

The purpose of this parameter is primarily to ensure that closure of the valve does not cause portions of the gas network to become isolated (a condition known to cause problems in simulation). The exact value specified here is less important that its being a (very small) number greater than zero.

Dependencies

This parameter is active and exposed in the block dialog box when the Valve parameterization setting is Cv coefficient (USCS).

Flow coefficient of the fully open valve, expressed in the SI units of L/min. This parameter measures the relative ease with which the gas will traverse the valve when driven by a given pressure differential. This is the value generally reported by manufacturers in technical data sheets.

Dependencies

This parameter is active and exposed in the block dialog box when the Valve parameterization setting is Kv coefficient (SI).

Flow coefficient of the maximally closed valve, expressed in the SI units of L/min. This parameter measures the relative ease with which the gas will traverse the valve when driven by a given pressure differential.

The purpose of this parameter is primarily to ensure that closure of the valve does not cause portions of the gas network to become isolated (a condition known to cause problems in simulation). The exact value specified here is less important that its being a (very small) number greater than zero.

Dependencies

This parameter is active and exposed in the block dialog box when the Valve parameterization setting is Kv coefficient (SI).

Opening area of the valve in the fully open position, when the valve is at the upper limit of the pressure regulation range. The block uses this parameter to scale the chosen measure of valve opening—sonic conductance, say, or CV flow coefficient—throughout the pressure regulation range.

Dependencies

This parameter is active and exposed in the block dialog box when the Valve parameterization setting is Opening area.

Opening area of the valve in the maximally closed position, when only internal leakage between the ports remains. This parameter serves primarily to ensure that closure of the valve does not cause portions of the gas network to become isolated (a condition known to cause problems in simulation). The exact value specified here is less important that its being a (very small) number greater than zero.

Dependencies

This parameter is active and exposed in the block dialog box when the Valve parameterization setting is Opening area.

Amount of smoothing to apply to the opening area function of the valve. This parameter determines the widths of the regions to be smoothed—one located at the fully open position, the other at the fully closed position.

The smoothing superposes on each region of the opening area function a nonlinear segment (a third-order polynomial function, from which the smoothing arises). The greater the value specified here, the greater the smoothing is, and the broader the nonlinear segments become.

At the default value of 0, no smoothing is applied. The transitions to the maximally closed and fully open positions then introduce discontinuities (associated with zero-crossings), which tend to slow down the rate of simulation.

Variables Tab

Initial condition for the temperature at the inlet of the valve. The block uses a first-order time lag to determine how this temperature will vary during simulation. Set the Priority option to Low to ignore the value specified here should conflicts with other initial conditions exist.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced in R2018b