Scicos Block
fr - eng

##
Thermohydraulic constant pressure source

### Contents

- Thermohydraulic constant pressure source
  - Description
  - Dialog box
  - Default properties
  - Interfacing function
  - Modelica model

### Description

This thermohydraulic component represents a thermo-hydraulic constant pressure supply. This block is specified with its output pressure and temperature. Conventionally, the flow direction is positive when the fluid flows out of the block.

### Dialog box

Paramètres du puit |
Pression de la source : P0 (Pa) | 300000
Temperature de la source : T0 (K) | 290
Enthalpie spécifique de la source : H0 (J/kg) | 100000
1:température fixée - 2:enthalpie fixée : option_temperature | 1

- Pression de la source : P0 (Pa) : Type 'vec' of size -1. Pressure of the thermohydraulic source
- Temperature de la source : T0 (K) : Type 'vec' of size -1. Temperature of the thermohydraulic source
- Enthalpie spécifique de la source : H0 (J/kg) : Type 'vec' of size -1. Specific enthalpie of the thermohydraulic source
- 1:température fixée - 2:enthalpie fixée : option_temperature : Type 'vec' of size -1. Temperature option. 1: fixed temperature - 2: fixed enthalpy

### Default properties

- always active: no
- direct-feedthrough: yes
- zero-crossing: no
- mode: no
- number/sizes of inputs: 0 /
- 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: Source

### Interfacing function

`SourceP.sci`

### Modelica model

    class Source
      parameter Real P0=300000 "Pression de la source";
      parameter Real T0=290 "Température de la source";
      parameter Real H0=100000 "Enthalpie spécifique de la source";
      parameter Real option_temperature=1 "1:température fixée - 2:enthalpie fixée";

      Real Pm "Pression moyenne";
      Real Q "Débit";
      Real Tm "Température moyenne";
      Real Hm "Enthalpie spécifique moyenne";

    public
      PortPHQ2 C ;
    equation

      C.P = Pm;
      C.Q = Q;
      C.Hm = Hm;

      Pm = P0;

      Hm = H0;

      Tm = if (option_temperature <= 1) then T0 else Hm/4187 + 273.15;

    end Source;