modeling of the flow comparator prototype as new primary ... · modeling of the flow comparator...

8
Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering DOI Proceedings of the 13 th International Modelica Conference 671 10.3384/ecp19157671 March 4-6, 2019, Regensburg, Germany Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering Sukhwinder Singh 1 Gerhard Schmitz 1 Bodo Mickan 2 1 Institute for Engineering Thermodynamics, Hamburg University of Technology, Germany, {sukhwinder.singh,schmitz}@tuhh.de 2 Physikalisch-Technische Bundesanstalt, Braunschweig, Germany, [email protected] Abstract The German national metrological institute, Physikalisch- Technische Bundesanstalt, is developing a new concept for volumetric primary standard to calibrate high pressure gas flow meters. The TUHH is supporting these R&D activities with its competence to elaborate computational models for detailed analysis of complex mechanical sys- tems including fluid flow aspects. The new primary stan- dard is based on a actively driven piston prover to measure the gas flow rate using the time the piston needs to displace a defined enclosed volume of gas in a cylinder. A computational model written in Modelica R is devel- oped to investigate the Flow Comparator’s dynamic be- havior. Validation of the model shows good compliance of the piston velocity and differential pressure at the pis- ton in the model with measured data. With this model the control voltage trajectory can be optimized to increase the available measuring time and it allows to gather detailed information about pressure and temperature development at arbitrary chosen locations in the system with high time resolution. Keywords: modeling of multi-domain physical systems, flow comparator, high pressure natural gas flow metering, linear motor, optimization 1 Introduction For the trade with natural gas the uncertainty of high pres- sure natural gas flow meters is of major importance. The calibration of the flow meters is done with transfer stan- dards which are calibrated by the German national pri- mary standard for high pressure natural gas flow. The current primary standard is a High Pressure Piston Prover (HPPP) (Schmitz and Aschenbrenner; PTB, 1991, 2009). It is owned and operated by the National Metrology Insti- tute of Germany Physikalisch-Technische Bundesanstalt (PTB) and installed on the calibration facility for gas me- ters pigsar TM in Dorsten, Germany. The HPPP can be op- erated with inlet pressures up to 90 bar and flow rates up to 480 m 3 /h (PTB, 1991). Due to the increasing size and flow rates of the gas flow meters and the limited operation range of the current na- tional standard, a new concept for calibrating gas flow me- ters is being developed, the Flow Comparator. A develop- ment prototype of the Flow Comparator is used for pre- liminary tests such as investigating the controllability and the usable flow rate at ambient conditions. A picture of the prototype is shown in Figure 1. Figure 1. Picture of the Flow Comparator prototype 2 Experimental Setup The key element of the Flow Comparator is a piston in a cylinder. Together they act as an asynchronous linear mo- tor. For this, the cylinder has two layers, one with mag- netic properties and the other one acts as an electrical con- ductor. The stator core with its windings is integrated into the piston. For the electrical power of the stator core a supply cable is connected to the piston. The velocity of the piston is controlled by using a frequency inverter to set the control voltage and frequency for the stator core. The experimental setup is shown in Figure 2. The dif- ferential pressure over the piston is measured with a sensor in the piston. A specified leakage in the piston with a flow sensor measures the fluid flowing through it. With the two sensors, it is possible to compare the piston movement rel- ative to the fluid flow. The piston has an integrated check valve to limit the pressure drop downstream of the piston. The position of the piston is measured using a dis- tance measuring equipment (DME). The ambient temper- ature and pressure as well as the temperature and pressure downstream of the cylinder are measured. A Turbine Meter (TM) is used as transfer standard. The TM measures the volume flow rate using the rotational

Upload: others

Post on 14-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modeling of the Flow Comparator Prototype as New Primary ... · Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering DOI thProceedings

Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering

DOI Proceedings of the 13th International Modelica Conference 671 10.3384/ecp19157671 March 4-6, 2019, Regensburg, Germany

Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering Singh, Sukhwinder and Schmitz, Gerhard and Mickan, Bodo

671

Modeling of the Flow Comparator Prototype as New PrimaryStandard for High Pressure Natural Gas Flow Metering

Sukhwinder Singh1 Gerhard Schmitz1 Bodo Mickan2

1Institute for Engineering Thermodynamics, Hamburg University of Technology, Germany,{sukhwinder.singh,schmitz}@tuhh.de

2Physikalisch-Technische Bundesanstalt, Braunschweig, Germany, [email protected]

AbstractThe German national metrological institute, Physikalisch-Technische Bundesanstalt, is developing a new conceptfor volumetric primary standard to calibrate high pressuregas flow meters. The TUHH is supporting these R&Dactivities with its competence to elaborate computationalmodels for detailed analysis of complex mechanical sys-tems including fluid flow aspects. The new primary stan-dard is based on a actively driven piston prover to measurethe gas flow rate using the time the piston needs to displacea defined enclosed volume of gas in a cylinder.

A computational model written in Modelica R© is devel-oped to investigate the Flow Comparator’s dynamic be-havior. Validation of the model shows good complianceof the piston velocity and differential pressure at the pis-ton in the model with measured data. With this model thecontrol voltage trajectory can be optimized to increase theavailable measuring time and it allows to gather detailedinformation about pressure and temperature developmentat arbitrary chosen locations in the system with high timeresolution.Keywords: modeling of multi-domain physical systems,flow comparator, high pressure natural gas flow metering,linear motor, optimization

1 IntroductionFor the trade with natural gas the uncertainty of high pres-sure natural gas flow meters is of major importance. Thecalibration of the flow meters is done with transfer stan-dards which are calibrated by the German national pri-mary standard for high pressure natural gas flow. Thecurrent primary standard is a High Pressure Piston Prover(HPPP) (Schmitz and Aschenbrenner; PTB, 1991, 2009).It is owned and operated by the National Metrology Insti-tute of Germany Physikalisch-Technische Bundesanstalt(PTB) and installed on the calibration facility for gas me-ters pigsarTM in Dorsten, Germany. The HPPP can be op-erated with inlet pressures up to 90 bar and flow rates upto 480 m3/h (PTB, 1991).

Due to the increasing size and flow rates of the gas flowmeters and the limited operation range of the current na-tional standard, a new concept for calibrating gas flow me-ters is being developed, the Flow Comparator. A develop-

ment prototype of the Flow Comparator is used for pre-liminary tests such as investigating the controllability andthe usable flow rate at ambient conditions. A picture ofthe prototype is shown in Figure 1.

Figure 1. Picture of the Flow Comparator prototype

2 Experimental SetupThe key element of the Flow Comparator is a piston in acylinder. Together they act as an asynchronous linear mo-tor. For this, the cylinder has two layers, one with mag-netic properties and the other one acts as an electrical con-ductor. The stator core with its windings is integrated intothe piston. For the electrical power of the stator core asupply cable is connected to the piston. The velocity ofthe piston is controlled by using a frequency inverter toset the control voltage and frequency for the stator core.

The experimental setup is shown in Figure 2. The dif-ferential pressure over the piston is measured with a sensorin the piston. A specified leakage in the piston with a flowsensor measures the fluid flowing through it. With the twosensors, it is possible to compare the piston movement rel-ative to the fluid flow. The piston has an integrated checkvalve to limit the pressure drop downstream of the piston.

The position of the piston is measured using a dis-tance measuring equipment (DME). The ambient temper-ature and pressure as well as the temperature and pressuredownstream of the cylinder are measured.

A Turbine Meter (TM) is used as transfer standard. TheTM measures the volume flow rate using the rotational

Page 2: Modeling of the Flow Comparator Prototype as New Primary ... · Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering DOI thProceedings

Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering

672 Proceedings of the 13th International Modelica Conference DOI March 4-6, 2019, Regensburg, Germany 10.3384/ecp19157671

p,T

TMNozzle BankFanOutlet

Inlet

DME ∆p,v Piston Prover

p0,T0

Figure 2. Scheme of the experimental setup with the Flow Comparator prototype

velocity of a turbine inserted into the fluid flow. The ro-tational speed is measured using a magnetically induceddiscrete signal of the turbine blades. The nozzle bank isused to set the flow rate and consists of calibrated nozzleswith different volume flow rates in a parallel setup. Thenozzle bank is not needed for the operation of the FlowComparator, but provides the advantage of decoupling theexperimental setup from pressure fluctuations created bythe fan. The fan ensures that the pressure downstream ofthe nozzle bank is low enough to have a critical flow in thenozzles.

At the beginning of a measurement, the volume flowrate is set by the nozzle bank and the piston moves slowlyupstream. At the starting point, the piston is accelerateddownstream until the piston velocity is the same as thefluid velocity. The actual measurement phase starts whenthe piston reaches the defined velocity and moves past acertain point. The measurement phase ends at a definedpoint downstream where the piston is stopped. The vol-ume flow rate can be calculated as stated in Equation 1,with the volume in between the starting and end point andthe time span ∆FCt. Therefore, the Flow Comparator istraceable to the standards of length and time.

VFC =VFC

∆FCt(1)

In the same time span, the discrete pulses of the turbinemeter are counted. The volume flow rate VTM indicatedby the turbine meter can be calculated using a relation-ship between volume flow rate and indicated signals pertime period for the turbine, which is known from previouscalibration (or from manufacturer specifications).

The calibration result is the relative deviation f at a cer-tain volume flow rate and pressure. The relative deviationis calculated as stated in equation 2 with the corrected vol-ume flow rate as indicated by the turbine and the correctedvolume flow rate as indicated by the Flow Comparator.

f =V c

TM−V cFC

V cFC

(2)

To improve the calibration accuracy, some corrections

are applied to the indicated volume flow rate by the turbinemeter and the Flow Comparator. These are explained inthe following:

1. With equation 3 it is possible to correct the errorcaused by the discrete nature of the turbine metersignals. As stated before, the time span ∆FCt is theduration of the measurement phase. The time span∆TMt is the duration from the first signal of the tur-bine meter after the start of the measurement phaseto the first signal of the turbine meter after the end ofthe measurement phase.

V cTM = VTM

∆FCt∆TMt

(3)

2. The following two corrections are applied due tosmall differences of piston velocity to the fluid ve-locity. With the differential pressure sensor and thefluid flow velocity sensor it is possible to comparethe flow upstream and downstream of the piston.

A non-zero differential pressure at the piston resultsin a leakage around the piston. The relationship be-tween leakage and differential pressure is stated inEquation 4.

Vleak,∆p = a√

∆p+b (4)

The coefficients a and b can be estimated by experi-ments.

The volume flow correction with the differentialpressure sensor is practical for relatively high leak-age flows. For small leakages at the piston the fluidflow velocity sensor can be used. A non-zero veloc-ity indicated by the fluid flow velocity sensor resultsin a leakage around the piston. The relationship isshown in equation 5 where the coefficients c and dare also experimentally determined.

Vleak,v = cv2 +dv (5)

Page 3: Modeling of the Flow Comparator Prototype as New Primary ... · Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering DOI thProceedings

Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering

DOI Proceedings of the 13th International Modelica Conference 673 10.3384/ecp19157671 March 4-6, 2019, Regensburg, Germany

3 Description of the modelModelica R© was used as modeling language to describe thephysical and dynamic behavior of the Flow Comparator.As simulation environment Dymola is used. A graphicalrepresentation of the developed model is shown in Fig-ure 3.

The assumptions used in the model are (von der Heydeet al., 2015):

• pressure losses are proportional to the dynamic pres-sure,

• the gas flow is one dimensional,

• the system is adiabatic,

• potential energy of the gas is neglected,

• the heat transfer in the gas can be neglected in com-parison to convective energy transport.

The air used in the Flow Comparator is sucked out ofthe experimental hall. Therefore, a constant ambient tem-perature and pressure can be assumed. This is modeledusing a supply volume of infinite size from the ModelicaStandard Library (MSL). These boundary conditions areset by equation 6 and equation 7. pIn is the inlet pressureand TIn is the inlet temperature

pIn = const. (6)

TIn = const. (7)

The air properties are calculated using an air model ofthe MSL.

Another boundary condition is set by the nozzle bank.As aforementioned the fan ensures that the pressure down-stream of the nozzle bank is low enough to have criticalflow in the nozzle. The critical volume flow rate VN in thenozzle is set by Equation 8.

VN = const. (8)

The physical behavior of several nozzles is the same toone larger nozzle with equivalent diameter. Therefore, thenozzle bank is modeled as one nozzle with larger diameterbased on equations from International Standard DIN ENISO 9300 (International Organization for Standardization,2005). The mass flow rate in the nozzle is calculated inEquation 9 using the critical volume flow rate VN and theupstream density ρ .

mN = VNρ (9)

For the model, the measuring cylinder is divided intoone volume upstream of the piston and one volume down-stream of the piston. The enclosed gas volumes depend onthe position of the piston and change volume with pistonmovement. They can store mass m, internal energy mu andmomentum mv as described in Equation 10, 11 and 12.

dmdt

= mi + mi+1 (10)

ddt

mu = mi

(hi +

v2i

2

)+ mi+1

(hi+1 +

v2i+1

2

)

+

(pi+1− pi + pf,i+1− pf,i

2

)Vi + Q

(11)

ddt

mv = mi|vi|+ mi+1|vi+1|−A(pi+1− pi)

−A(pf,i+1− pf,i)(12)

In direction of fluid flow a spatial discretization is ap-plied which leads to a number of finite volumes in the en-closed gas volume. For the discretization the finite volumemethod with a staggered grid approach is used. Figure 4shows the placement of variables on a 1D staggered mesh.The scalar variables (e.g. pressure, density etc.) are lo-cated in the control volume cell center while the velocityand momentum variables are stored on the cell faces.

Equations 10-12 are applied for each finite volume inthe enclosed gas volume. m is the mass flow rate, h thespecific enthalpy, v the mean velocity in the cross area, pthe static pressure, pf the pressure loss due to friction, Vthe volume and Q is the heat flow.

The pressure loss is calculated using the detailed char-acteristic wall friction model from the MSL. The modelcalculates the pipe friction coefficient depending on theReynolds number and the relative roughness. A heat portis included in the model of the enclosed gas volume andcan be connected to another heat port, e.g. the ambient orthe piston. The heat flow in the model is calculated usinga heat transfer model from the MSL.

The position and motion of the piston is determined bythe equation of motion as stated in Equation 13.

mPsP = p1AP− p2AP−FR,P−FR,C +FLM (13)

p1 and p2 are the pressures of the fluid upstream anddownstream of the piston, FR,P is the roll resistance of thepiston, FR,C the resistance of the connection cable and FLMis the force of the linear motor to drive the piston. Theroll resistance of the piston is modeled using a constantrolling resistance coefficient as stated in equation 14 withcR being the roll resistance coefficient and FN being thenormal force of the piston.

FR,P = cRFN (14)

The resistance due to the weight of the connection cableFR,C is modeled as shown in Equation 15 with g being thegravitational force, mC the total weight of the connectioncable, s the current position of the piston and l the totallength of the connection cable.

Page 4: Modeling of the Flow Comparator Prototype as New Primary ... · Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering DOI thProceedings

Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering

674 Proceedings of the 13th International Modelica Conference DOI March 4-6, 2019, Regensburg, Germany 10.3384/ecp19157671

Supply Volume Piston

s

p1

FilterPipe TMNozzle Bank

m,p,h

Medium System l2l1

p2

Volume 1 Volume 2

M

ControlVoltage

Motor

U F

m,p,h m,p,h

m,p,h

m,p,h

Check Valve

Flow Resistance

m,p,h m,p,h

Figure 3. Graphical representation of the computational model

vn−1 vn vn+1pn−1 pnρn−1 ρn

Figure 4. Placement of variables using the finite volume methodwith a staggered grid approach

FR,C = g ·mCsl

(15)

The movement of the piston can be controlled with thelinear motor integrated into the piston. As a first approachto model the force of the linear motor, a function depend-ing on control voltage input and velocity of the piston isused. The function is derived by measuring the velocity ofthe piston for several control voltages and different flowresistances. The fitting function used is shown in Equa-tion 16.

FLM = α(I− IS) · (v

Ucontrol− vS)+FF (16)

α is a proportional constant, I is the electric current ofthe linear motor, IS is the magnetizing current for the mag-netic field, v is the velocity of the piston, vS is the normal-ized synchronous velocity of the linear motor and FF is thefriction force of the piston. The experimental data and theresult of the fitting is shown in Figure 5 where each linerepresents a different control voltage. The experimentaldata and fitting function are close-fitting overall. The out-put of the linear motor model is the force accelerating the

piston. The motor model needs the current velocity of thepiston and control voltage of the frequency inverter as in-put.

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

v/Ucontrol

in m/Vs

-200

-100

0

100

200

300

400

forc

e in

N

ExperimentRegression

Figure 5. Experimental results and fitting function for the force-velocity relation of the linear motor

The control voltage model depends on the position ofthe piston. Initially, it increases linearly to a predefinednegative value. When the starting position of the piston isreached, the control voltage increases to a defined positivevalue.

The check valve in the piston is modeled as a checkvalve between the gas volumes of the measuring cylinder.It opens at a specific differential pressure and enables afluid flow from volume 1 to volume 2. The check valve ismodeled with a hysteresis to avoid chattering. The massflow rate through the check valve is proportional to thepressure drop over the check valve. For this a pressure losscoefficient ζCV as specified by the manufacturer is used.

The flow resistance model describes the leakage be-tween measuring cylinder and piston as there is a small

Page 5: Modeling of the Flow Comparator Prototype as New Primary ... · Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering DOI thProceedings

Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering

DOI Proceedings of the 13th International Modelica Conference 675 10.3384/ecp19157671 March 4-6, 2019, Regensburg, Germany

diameter difference between the two. To describe the re-lation of mass flow rate and pressure drop a function isderived from experiments.

The turbine meter model uses a constant pressure losscoefficient ζTM to model the pressure loss in the turbinemeter as shown in Equation 17. ρ is the density and vA themean velocity in the cross area A of the turbine meter.

∆p = ζTMρ

2v2

A (17)

The pressure loss coefficient ζTM is taken from mea-surement data. The relationship between indicated vol-ume flow rate and real volume flow rate of the turbine ismodeled as stated in Equation 18 which is a further devel-opment of the equation described in (Mickan et al., 2010).vi,rel is the relative indicated volume flow rate in relationto the maximal possible volume flow rate for the specificturbine meter, v the real volume flow rate, ρ is the densityand vi the indicated volume flow rate. The coefficients a,b, A and B are results of different experiments.

vi,rel− (a+bvi,rel) = Aρv2−Bρvvi (18)

The filter is modeled as simple flow resistance and thepressure loss is determined as shown in equation 17. TheDynamicPipe model of the MSL is used as the pipe model.It uses the balance equations for mass m, internal en-ergy mu and momentum mv shown in Equation 19, 20and 21 on a number of finite volumes in the pipe. m isthe mass flow, h the specific enthalpy, v the velocity, A thecross-sectional area of the pipe, p the pressure and FF thefriction force in the pipe (Mickan et al., 2010).

dmdt

= mi + mi+1 (19)

ddt

mu = mihi + mi+1hi+1

+12(vA(pi+1 + pi)+ vFF)

(20)

ddt

mv = mi|vi|+ mi+1|vi+1|−A(pi+1− pi)−FF (21)

4 VerificationThe verification of a model shows the correct physicalimplementation of a model and the accurate solution ofthe equation system. For this, different parameter of themodel are varied and piston velocity and pressure differ-ence over the piston are used as measure for verification.

For the solution of the equation system, the solver Dasslwith a relative tolerance of 10−6 is used. A further de-crease in relative tolerance as well as using other solversdoes not change the model trajectory. For the volumes ofthe measuring pipe, 8 discrete volumes are used and forthe pipe, 4 discrete volumes are used.

In Figure 6, the piston velocity for different controlvoltages of the frequency inverter is shown. The accel-eration of the piston is the same as it primarily depends onthe power ramp of the frequency inverter. Higher controlvoltages have a greater maximum peak velocity as well asend velocity.

0 1 2 3 4 5 6 7 8 9 10

time in s

0

0.2

0.4

0.6

0.8

pist

on v

eloc

ity in

m/s

1.2 V1.6 V2 V

Figure 6. Piston velocity over time for different frequency in-verter control voltages

The piston velocity for different rising time for the rampof the frequency inverter is shown in Figure 7. As ex-pected, a lower rising time results in a higher accelerationof the piston due to the faster increasing current in the lin-ear motor and therefore a higher induced force on the pis-ton. After the control voltage has increased to the definedvalue, the difference in piston velocity decreases and thepiston velocity is almost the same at the end of the simu-lation.

0 1 2 3 4 5 6 7 8 9 10

time in s

0

0.1

0.2

0.3

0.4

0.5

pist

on v

eloc

ity in

m/s

3 s5 s7 s

Figure 7. Piston velocity over time for different frequency in-verter rising time

In Figure 8, the differential pressure at the piston fordifferent volume flow rates of incoming air flow is shown.For a volume flow rate of 65 m3/h, the piston velocity isclose to the velocity of the air flow and the differentialpressure is almost zero after the acceleration process. Asthe piston velocity is almost independent of the air flowrate, a lower volume flow rate results in a negative differ-ential pressure at the piston. A negative differential pres-sure means that the downstream pressure is higher than theupstream pressure due to the faster movement of the pis-ton in comparison to the air flow. Accordingly, a higher airflow rate results in a positive differential pressure aroundthe piston.

Page 6: Modeling of the Flow Comparator Prototype as New Primary ... · Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering DOI thProceedings

Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering

676 Proceedings of the 13th International Modelica Conference DOI March 4-6, 2019, Regensburg, Germany 10.3384/ecp19157671

0 1 2 3 4 5 6 7 8 9 10

time in s

-1000

-500

0

500

1000

1500

p in

Pa

40 m3/h

65 m3/h

90 m3/h

Figure 8. Differential pressure at the piston over time for differ-ent air flow rates

5 ValidationTo use the model for further predictions of the dynamic be-havior of the Flow Comparator, the accuracy of the modelis highly relevant. The accuracy is affected by the afore-mentioned mentioned general assumptions, the accuracyof the empirical correlation for the linear motor and fre-quency inverter, the assumptions for the friction force, andfurther simplifications.

For the model’s validation, the prototype’s measure-ment data is used. The experiments are conducted as de-scribed in Section 2. The position of the piston is mea-sured using the laser distance measuring equipment.

The simulations are carried out with the same controlvoltage for the frequency inverter as the experiment fora given air flow rate to validate the empirical approachused for frequency inverter and linear motor. The momentwhen the piston starts moving forward is set as t = 0 s andthe validation is only done for that part of the experimentas this is the important part of the measurement.

In Figure 9, the piston velocity in simulation and ex-periment is shown over time for a volume flow rate of116 m3/h and a control voltage of 1.95 V. In the first 0.5 s,the linear motor is not active due to the rising ramp of thefrequency inverter and the piston is accelerated by the dif-ferential pressure at the piston. In this time frame, thesimulation shows a lower acceleration for the piston thanin the measurement. When the linear motor is active, thesimulated piston acceleration is higher than the measuredacceleration of the piston. In simulation and measurement,the maximum piston velocity is similar. The decrease inpiston velocity due to the increasing resistance force ofthe connection cable shows a similar behavior in simula-tion and measurement. Overall, a relatively good accor-dance of the simulated and measured piston velocity for avolume flow rate of 116 m3/h is achieved.

The differential pressure at the piston over the time forthe simulation and the measurement is shown in Figure 10for a volume flow rate of 116 m3/h and a control volt-age of 1.95 V. The differential pressure around the pistonbetween simulation and measurement shows a time off-set. The simulation has an immediate differential pressuredrop when the piston accelerates while the measurement

0 1 2 3 4 5 6 7

time in s

0

0.2

0.4

0.6

0.8

pist

on v

eloc

ity in

m/s

SimulationMeasurement

Figure 9. Comparison of the piston velocity over the time in themodel and the measured data for a volume flow rate of 116 m3/hand a control voltage of 1.95 V

data shows a delayed decrease in differential pressure. Theslope of differential pressure decrease is the same for sim-ulation and measurement. Except for the time offset, thesimulation and measurement show a good agreement inbehavior of the differential pressure at the piston.

-1 0 1 2 3 4 5 6

time in s

-500

0

500

1000

1500

2000

2500

3000

p in

Pa

SimulationMeasurement

Figure 10. Comparison of the differential pressure at the pistonover the time in the model and the measured data with a timeoffset toff = −1.9s for a volume flow rate of 116 m3/h and acontrol voltage of 1.95 V

For validation of lower volume flow rates, the simula-tion and measurement data for V = 65 m3/h is shown inFigure 11. The simulation again has a lower piston accel-eration at the beginning and a higher piston accelerationwhen the linear motor is active. After reaching the max-imum piston velocity simulation and experimental datahave an similar decrease in piston velocity. Therefore, agood accordance between measurement and simulation isalso achieved for lower volume flow rates.

The difference in acceleration between simulation andmeasurement data due to the air flow is caused partly bythe modeling of the pistons resistance force and the ap-proach of using a constant roll resistance coefficient. Thismay lead to the described difference. The accuracy of thelinear motor model may be increased by using an empiri-cal approach which describes the dynamic part of the ac-celeration in more detail.

Page 7: Modeling of the Flow Comparator Prototype as New Primary ... · Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering DOI thProceedings

Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering

DOI Proceedings of the 13th International Modelica Conference 677 10.3384/ecp19157671 March 4-6, 2019, Regensburg, Germany

0 1 2 3 4 5 6 7 8 9 10

time in s

0

0.1

0.2

0.3

0.4

0.5

pist

on v

eloc

ity in

m/s

SimulationMeasurement

Figure 11. Comparison of the piston velocity over the timein the model and the measured data for a volume flow rate of65 m3/h and a control voltage of 1.25 V

6 Optimized control voltage trajec-tory

The model is used to optimize the control voltage tra-jectory of the frequency inverter to increase the availablemeasuring time. The differential pressure at the piston isused as measure for the available measuring time.

There are different aspects to consider when optimizingthe control voltage. The pressure drop at the piston resultsin a lower density downstream of the piston and accord-ingly less mass in the measuring cylinder. In order to in-crease the pressure and density downstream of the pistonan overshoot in piston velocity is necessary. Accordingly,an overshoot in control voltage needs to be applied. Thepiston’s resistance increases while it moves downstreamdue to the connection cable. Therefore, an increase indriving force is necessary.

In Figure 12 the trajectory of the optimized and non-optimized control voltage over time for a volume flow rateof 116 m3/h is shown. The control voltage in the opti-mized case has an maximum value of 2.8 V and thus hasan overshoot of 0.85 V. It decreases to a value close to thenon-optimized control voltage and then increases with aconstant slope.

0 1 2 3 4 5 6 7

time in s

0

0.5

1

1.5

2

2.5

3

cont

rol v

olta

ge in

V

Non-optimizedOptimized

Figure 12. Comparison of the optimized and non-optimized fre-quency inverter control voltage over time for a volume flow rateof 116 m3/h

The piston velocity over time is shown in Figure 13 forboth regarded cases. The piston velocity is the same as

long as the control voltage is increasing and has the samevalue. At the control voltage overshoot the piston velocityfor the optimized case overshoots, too. After the over-shoot the piston velocity in the optimized case reaches theair flow velocity much earlier than in the non-optimizedcase. Furthermore, the piston velocity in the optimizedcase stays close to the flow velocity while the piston ve-locity in the non-optimized case decreases continuously.

0 1 2 3 4 5 6 7

time in s

0

0.2

0.4

0.6

0.8

1

1.2

pist

on v

eloc

ity in

m/s

Non-optimizedOptimized

Figure 13. Comparison of the piston velocity over time for theoptimized and non-optimized frequency inverter control voltagefor a volume flow rate of 116 m3/h

The differential pressure at the piston over time for thenon-optimized and optimized case is shown in Figure 14.At the beginning of the measurement the differential pres-sure at the piston is the same for both regarded cases. Thedifferential pressure at the piston decreases faster to thedesired value of ∆p= 0 Pa than in the non-optimized case.Furthermore, in the optimized case the differential pres-sure stays in a close range around ∆p = 0 Pa during themeasurement. In comparison, the differential pressure atthe piston in the non-optimized case is increasing.

The maximum permitted differential pressure at the pis-ton during the measuring time is set to ∆p = 50 Pa. Withthis restriction the measuring time of the optimized case is4.5 s long while in the non-optimized case the measuringtime is about 2.5 s. The measuring time can be increasedby 80 % using the optimized control voltage trajectory.

-1 0 1 2 3 4 5 6 7

time in s

-500

0

500

1000

1500

2000

2500

p in

Pa

Non-optimizedOptimized

Figure 14. Comparison of the differential pressure at the pis-ton over time for the optimized and non-optimized frequencyinverter control voltage for a volume flow rate of 116 m3/h

Page 8: Modeling of the Flow Comparator Prototype as New Primary ... · Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering DOI thProceedings

Modeling of the Flow Comparator Prototype as New Primary Standard for High Pressure Natural Gas Flow Metering

678 Proceedings of the 13th International Modelica Conference DOI March 4-6, 2019, Regensburg, Germany 10.3384/ecp19157671

7 Conclusion and OutlookA model of the Flow Comparator is implemented inModelica R©. The model is successfully verified and val-idated against measurement data. With the model the fre-quency inverter control voltage trajectory is optimized tomaximize the available measuring time. With this simpleoptimization, the measuring time could be increased by80 % in the model. This result of optimization will allowto extend the upper limits of flow rate usable for calibra-tions. Furthermore, the possibility to gather detailed infor-mation about pressure and temperature development at ar-bitrary chosen locations in the system with high time res-olution enables much better and more reliable statementsabout the accuracy of flow rate measurement with this sys-tem.

The model uses an empirical approach to model the lin-ear motor’s force. In future work, the linear motor shouldbe modeled using physically based equations. Addition-ally, it will be essential to extend the model by heat trans-fer from the motor components to the gas to complete themodeling of the overall thermodynamic performance ofthe piston prover.

Furthermore, the optimization of the frequency invertercontrol voltage should be done using a more detailed ap-proach. For this the position depending resistance as wellas the increase of resistance due to the connection cableweight needs to be measured exactly.

In future work the check valve model and the model ofthe leakage between piston and cylinder can be improvedby using a greater number of measurements to describetheir behavior.

ReferencesInternational Organization for Standardization. DIN EN ISO

9300: Durchflussmessung von Gasen mit Venturidüsen beikritischer Strömung. 2005.

B. Mickan, R. Kramer, and V. Strunck. Transient response ofturbine flow meters during the application at a high pres-sure piston prover. In 15th Flow Measurement Conference(FLOMEKO). Linköping University Electronic Press, 2010.

Physikalisch-Technische Bundesanstalt PTB. Prüfschein derRohrprüfstrecke. 1991.

Physikalisch-Technische Bundesanstalt PTB. PTB Mitteilun-gen. Special Issue Volume 119 no.1, 2009.

G. Schmitz and A. Aschenbrenner. Experience with a PistonProver as the New Primary Standard of the Federal Republicof Germany in High-Pressure Gas Metering. In Proceedingsof the 18th World Gas Conference, Berlin, 8.-12.7.1991.

M. von der Heyde, G. Schmitz, and B. Mickan. Modeling ofthe German National Standard for High Pressure Natural GasFlow Metering in Modelica. In Proceedings of the 11th Inter-national Modelica Conference, Versailles, France, Septem-ber 21-23, 2015. Linköping University Electronic Press, sep2015. doi:10.3384/ecp15118663. URL https://doi.org/10.3384/ecp15118663.