Scicos Block
fr - eng

##
Thermohydraulic control valve

### Contents

- Thermohydraulic control valve
  - Description
  - Dialog box
  - Default properties
  - Interfacing function
  - Modelica model

### Description

The VanneReglante block represents a variable orifice control valve. The flow rate through the valve is proportional to the valve opening, i.e.,

where is the valve opening, is the pressure difference, and is the flow rate. This model is only used for the laminar flow regimes. is a constant depending on the valve geometry and mass density of fluid.

### Dialog box

Paramètres de la vanne reglante |
Cvmax | 8005.42
p_rho | 0

- Cvmax : Type 'vec' of size -1. Cvmax (maximum opening of the valve)
- p_rho : Type 'vec' of size -1. Fluid density

### Default properties

- always active: no
- direct-feedthrough: yes
- zero-crossing: no
- mode: no
- number/sizes of inputs: 2 / 1 1
- number/sizes of outputs: 1 / 1
- number/sizes of activation inputs: 0 /
- number/sizes of activation outputs: 0 /
- continuous-time state: no
- discrete-time state: no
- name of modelica function: VanneReglante

### Interfacing function

`VanneReglante.sci`

### Modelica model

    class VanneReglante
      parameter Real Cvmax "CV max";
      parameter Real p_rho "Si > 0, masse volumique imposée du fluide";
    //  parameter Integer mode=0 "Région IF97. 1:liquide - 2:vapeur - 4:saturation - 0:calcul automatique";

      parameter Real eps=1.e-0 "Limite inf. de la fonction carrée";
      Real Cv "Cv";
      Real Q(start=500) "Débit massique";
      Real deltaP "Perte de charge singulière";
      Real rho(start=998) "Masse volumique";
      Real Tm(start=290) "Température moyenne";
      Real Pm(start=1.e5) "Pression moyenne";
      Real Hm(start=100000) "Enthalpie spécifique moyenne";
      Real region(start=1) "Numéro de région IF97";
      Real ThermoCar;

      Real Ouv ;

    public
    //  EntreeReelle Ouv ;
      PortPHQ1 C1 ;
      PortPHQ2 C2 ;

    equation

      C1.H = C2.H;
      C1.Q = C2.Q;

      Q = C1.Q;
      deltaP = C1.P - C2.P;

      /* Inversions de débit */
      0 = if (Q > 0.0) then C1.H - C1.Hm else C2.H - C2.Hm;

      /* Calcul de la perte de charge */

      ThermoCar = if (abs(Q) > eps) then Q*abs(Q) else Q*eps;
      deltaP*Cv*abs(Cv) = 1.733e12*ThermoCar/rho^2;

      /* Calcul du Cv en fonction de l'ouverture */
      Cv = Ouv*Cvmax;

      /* Calcul des propriétés thermodynamiques */
      Pm = (C1.P + C2.P)/2;
      Hm = (C1.H + C2.H)/2;

      Tm = Hm/4187 + 273.15;
      region = 1;

      rho = 998;

    end VanneReglante;