Development of the FASTPROOF project: Implementation of a Modelica - - PowerPoint PPT Presentation

development of the fastproof project implementation of a
SMART_READER_LITE
LIVE PREVIEW

Development of the FASTPROOF project: Implementation of a Modelica - - PowerPoint PPT Presentation

Development of the FASTPROOF project: Implementation of a Modelica library for the simulation of offshore facilities Workshop on Simulation at the System Level Carg` ese, 2014 1 / 37 Context FASTPROOF is a collaborative project between


slide-1
SLIDE 1

Development of the FASTPROOF project: Implementation of a Modelica library for the simulation of offshore facilities

Workshop on Simulation at the System Level Carg` ese, 2014

1 / 37

slide-2
SLIDE 2

Context

  • FASTPROOF is a collaborative project between eni, saipem,

eurobios and ENS Cachan

  • The goal is to develop a software tool to simulate the operation of
  • ffshore oil facilities
  • Focus is on open formats and open languages to share models and

data - make them easy to extend

  • The simulation concerns the global behavior of the system, with

both physics and risk aspects

2 / 37

slide-3
SLIDE 3

Context

Two aspects:

  • Physics

◮ Fluid flow in pipes ◮ Heat transfer: through pipe walls, from heating system, etc. ◮ Power consumption/energy conversion: electrical (generators),

mechanical (pump), heat (heater)

◮ Controlled systems: check stability/efficiency of controllers

  • Risk

◮ Failure of components ◮ Maintenance ◮ Reliability 3 / 37

slide-4
SLIDE 4

Context

Goals:

  • Physics

◮ Help dimensioning some of the system characteristics, e.g. generator

power, thickness of insulation layers, etc.

◮ Centralize the data to be shared between various actors ◮ Study the behavior of the whole system ◮ Based on the equations of physics

  • Risk

◮ Estimate the availability of an installation ◮ Compare the reliability of two designs ◮ Assess the gain/risk ratio of an installation ◮ Stochastic simulation: probabilities, statistics 4 / 37

slide-5
SLIDE 5

Framework design

  • Physics

◮ Favor the composability of the developed models ◮ Ideally, the user can freely combine the models ◮ The components should be re-usable, i.e. not developed for a

particular set of neighbor components

◮ The components should be extensible, i.e. easy to refine

  • Risk

◮ Models easy to understand, with parameters that can actually be

known (e.g. no conditional probabilities no one can know)

◮ Synthetic output to help the decision 5 / 37

slide-6
SLIDE 6

Summary

1 Introduction 2 Physics simulation 3 Risk simulation 4 Two examples 5 Conclusion

6 / 37

slide-7
SLIDE 7

Modelica

  • Modelica is a simulation language

◮ It is object-oriented i.e. a new model can be built upon an existing

model

◮ It is acausal: no imposed causality (i.e. no pre-specified input/output)

  • A model is a set of differential algebraic equations (+ algorithms)
  • Models are connected through connectors
  • The connectors automatically add the equations at the interface

between components:

◮ Potential variables: Equality at the connection point ◮ Flow variables: sum to zero at the connection point ◮ Stream variables: transported quantities (depends on the sign of an

associated flow variable)

  • Tools are available to compile and run models and plot the outputs

(e.g. OpenModelica, Dymola)

7 / 37

slide-8
SLIDE 8

Multi-physics simulation with Modelica

  • Specific connectors are defined for each type of physical phenomenon
  • Modelica allows the call to external code (e.g. in C language), which

can be used to read parameters in a database for example

Reservoir

Mass conservation Momentum conservation Energy conservation

Fluid flow

Pipeline Pump Pipe wall

Thermal diffusion law

  • 10
10 20 30 40 °C

Fluid characteristics

Sea temperature model

Electromechanical conversion

Electric power supply Experimental data

Mass flow Fluid composition Transport specific enthalpy Pressure Current Voltage Temperature Heat flow

Experimental data

Heat transfer 8 / 37

slide-9
SLIDE 9

Modelica components

  • Typical models in an offshore facility:

◮ Pipes: flow of a fluid mixture ◮ Heat: heat transfer through pipe wall, through heating material ◮ Electrical: diesel generator ◮ Controllers: heating system ◮ Other items: tanks, valves, junctions, pumps 9 / 37

slide-10
SLIDE 10

Pipe model

  • Connector for pipe models:

◮ Pressure p ◮ Mass flow rate qm ◮ Vector of mass fractions X = (X1, X2, . . . , Xn) ◮ Transported specific enthalpy h

  • Equations:

◮ Volume conservation ◮ Mass balance ◮ Enthalpy balance ◮ Pressure drop

Length = 500 m

10 / 37

slide-11
SLIDE 11

Pipe model

  • Two ports: a and b
  • 0D model, quasi-stationary state
  • Volume conservation:

n

  • i=1

X a

i qa m

ρi +

n

  • i=1

X b

i qb m

ρi = 0

  • Mass balance:

˙ mi = X a

i qa m + X b i qb m

  • Enthalpy balance:

h =

n

  • i=1

XicpiT H = mtotalh Hflow = qa

mha + qb mhb

˙ H = Hflow + Qwall

flow

11 / 37

slide-12
SLIDE 12

Pipe: friction model

  • For one substance:

dpi = pressureLossCoefficient(ρi, D, L, µi, vi) |vi| + dpgi

  • Velocity of substance i is

vi = X a

i qa m

ρiA

  • Hydrostatic pressure term:

dpgi = sin(θ)mig A

  • pressureLossCoefficient() is given by:

pressureLossCoefficient(ρi, vi, D, L, µi) = fDarcy(Rei, D)Lρi 2D

  • Overall pressure drop:

dp =

n

  • i=1

dpi = pa − pb

12 / 37

slide-13
SLIDE 13

Pipe model

  • The pipe model is 0D: all the quantities are averaged inside the

volume

  • It is possible to approximate a 1D model by concatenating multiple

0D models

  • Example: 1500m pipeline divided into 30 segments

T emperature at the well Sea temperature T emperature along the pipeline 13 / 37

slide-14
SLIDE 14

Heat transfer models

  • Heat connector: Temperature T, heat flow rate Qflow
  • Basic model of material with heat capacity (two heat connectors)

   Cp dT

dt

= Qa

flow + Qb flow

Qa

flow

= Kth (T a − T) Qb

flow

= Kth

  • T − T b
  • Insulation layers are stacks of blocks:

Fluid Pipe wall Heater Insulant Sea water Joule heating

T1 T2 T3 T4 T5 T6 T7

kth1(T1 - T2) kth1(T2 - T3) kth2(T3 - T4) kth2(T4 - T5) kth3(T5 - T6) kth3(T6 - T7)

T1 T7

14 / 37

slide-15
SLIDE 15

Electrical models

  • Electric connector: electric potential v, electric current i
  • Example, diesel generator: two electrical connectors (e1 and e2), one

fluid connector ve1 − ve2 = V0 ie1 + ie2 = qm × specific energydiesel = (ve1 − ve2) ie1

  • Heating system with temperature control: two electrical connectors

(e1 and e2), two heat connectors (h1 and h2), one input signal (Tref) Q = (ve1 − ve2) ie1 ie1 + ie2 = Cp dT dt = Q + Kth (Th1 − T) + Kth (Th2 − T) Q = min(max (Kp (T − Tref) , 0) , Qmax)

Diesel Generator

1500 V

heating mat.

15 / 37

slide-16
SLIDE 16

Summary

1 Introduction 2 Physics simulation 3 Risk simulation 4 Two examples 5 Conclusion

16 / 37

slide-17
SLIDE 17

Two levels

  • Macro level based on expert knowledge

◮ General description of the system with a small number of states

  • Micro level based on statistics of observed failures

◮ The components are considered individually 17 / 37

slide-18
SLIDE 18

Macro level

  • The system is modeled as a Markov chain
  • Markov chains are sequences of random variables taking values in a

so-called state space

6 hydrates 1 production 0.98 2 no touch time / repair 0.02 1 0.5 3 repair fpso or subsea / preserv ok 0.5 4 restart 0.98 5 repair preserv 0.02 0.98 0.02 0.02 0.98 18 / 37

slide-19
SLIDE 19

Macro level

  • Monte-Carlo method: generate many random sequences of events
  • Simulate decision strategies and context changes
  • Results are reported using standard techniques in statistics:
  • Mean / variance

representation

  • Assessment of extreme

values

  • Assessment of resilience
  • Evaluation of confidence

intervals

19 / 37

slide-20
SLIDE 20

Micro level

  • The micro level is meant to model component failures and

maintenance

  • Based on statistics gathered on real installations
  • Each item is considered independently from the others
  • Data comes from the OREDA1 handbook: statistics for

time-between-failures and time-to-repair

1Offshore Reliability Data Handbook. 4th Edition. SINTEF Technology and Society

(2002).

20 / 37

slide-21
SLIDE 21

OREDA database

  • Example of the values given by OREDA (centrifugal pump):

Failure mode Number of failures Failure rate (per 106 hours) Repair time (hours) Mean Standard deviation Min Max Mean Critical 464 70.52 106.81 1.0 57.6 1025.0 Degraded 537 237.3 267.91 0.5 32.1 798.0 Incipient 936 834.3 688.83 0.5 15.6 697.0 Unknown 12 4.5 6.65 2.0 13.6 48.0

  • From these data, we can build a stochastic model of the component

21 / 37

slide-22
SLIDE 22

Markov chain model (micro level)

  • Continuous-time semi-Markov chain:

OK

Critical

Degraded

Incipient

Unknown

pcritical tcritical pdegraded tdegraded pincipient tincipient punknown tunknown trepair critical trepair degraded trepair incipient trepair unknown

  • pi: probability of transition to state i
  • ti: holding time, i.e. time before the transition actually triggers

22 / 37

slide-23
SLIDE 23

Markov chain model (micro level)

  • Transition probabilities: pfailure i= number of observed failures of type i

number of observed failures of any kind

  • Holding times are computed from failure rates (exponential

distribution) and (min,mean,max) values (beta distribution)

10 30 50 70 90 2 6 14 18 22 26 34 38 42 46 54 58 62 66 74 78 82 86 94 98 1 0.2 0.4 0.6 0.8 1.2 0.1 0.3 0.5 0.7 0.9 1.1 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95 1.05 1.15

Time [hour] Probability density function

min max mean

Pump

OK critical ~24% ~7m degraded ~28% ~16y incipient ~48% ~2m unknown ~ 1% ~11y ~100% ~2d ~100% ~1d ~100% ~15h ~100% ~13h

23 / 37

slide-24
SLIDE 24

Spare components

  • A component can have associated spare units
  • Adding a spare to the less reliable component:

No spares

generator = 97% valve2 = 0.2% diesel_pump = 2.4% Failed = 4.5% OK = 96%

One spare generator

generator = 59% generator_spare1 = 36% diesel_pump = 3.1% valve2 = 1.6% Failed = 1.1% OK = 99%

Failure duration per component Time spent in failed and normal states

24 / 37

slide-25
SLIDE 25

Summary

1 Introduction 2 Physics simulation 3 Risk simulation 4 Two examples 5 Conclusion

25 / 37

slide-26
SLIDE 26

Test cases

  • We simulate the process of stopping the production for repair, waiting and

restarting

  • Shutting down production causes the mixture to cool down while at rest in the line
  • The temperature in the line must not fall below a specific temperature...
  • ... otherwise hydrates might form and block the line
  • Example of two strategies to prevent hydrate formation: Hybrid loop and Heated

line designs Wellhead Production line Surface storage Deep sea 60°C T 5°C T

26 / 37

slide-27
SLIDE 27

Test case 1

  • Hybrid loop design: replace mixture in the production line with diesel

Well Valve Manifold Service line Production line Riser Riser

FPSO

Controller

Sea temperature

Logical connection

Heat transfer 27 / 37

slide-28
SLIDE 28

Test case 2

  • Heated line design: heat the line with an electric heating system

Well Valve Heated line Riser Sea temperature Controller FPSO Electric connections Logical connection

Heat transfer 28 / 37

slide-29
SLIDE 29

FPSO

  • FPSO (Floating Production, Storage and Offloading) unit model

29 / 37

slide-30
SLIDE 30

System states

  • Hybrid loop has five states: production, no-touch time, diesel

injection, repair, recirculation → production restart

1) PRODUCTION

Diesel T ank

Outlet

Storage T ank

Inlet Heated Line

FPSO

Inlet

Valve 1 Valve 2 Valve 4 Valve 3 Valve 6

OFF

Valve 5 Pump

OFF

Production Line Service Line

  • Heated line has four states: production, no-touch time, repair,

heating → production restart

30 / 37

slide-31
SLIDE 31

System states

  • Hybrid loop has five states: production, no-touch time, diesel

injection, repair, recirculation → production restart

2) INJECTION

Diesel T ank

Outlet

Storage T ank

Inlet Heated Line

Production Line

FPSO

Service Line

Inlet

Valve 1 Valve 2 Valve 4 Valve 3 Valve 6

OFF

Valve 5 Pump

ON

  • Heated line has four states: production, no-touch time, repair,

heating → production restart

30 / 37

slide-32
SLIDE 32

System states

  • Hybrid loop has five states: production, no-touch time, diesel

injection, repair, recirculation → production restart

3) RECIRCULATION

Diesel T ank

Outlet

Storage T ank

Inlet Heated Line

FPSO

Inlet

Valve 1 Valve 2 Valve 4 Valve 3 Valve 6

ON

Valve 5 Pump

ON

Production Line Service Line

  • Heated line has four states: production, no-touch time, repair,

heating → production restart

30 / 37

slide-33
SLIDE 33

Example of outputs

  • Hybrid loop

0.2 0.4 0.6 0.8 1 Time [s] 50 000 100 000 150 000 200 000 250 000 300 000 350 000 Mass fractions in production line Oil

5000m 10000m 15000m 20000m 25000m 30000m 35000m 40000m 45000m 50000m

Position along the pipe:

Production + no-touch time Injection Repair Recirculation Production

Well head FPSO

Diesel

T emperature restart threshold

270 280 290 300 310 320 330 340 Time [s] 50 000 100 000 150 000 200 000 250 000 300 000 350 000 Temperature in the production line [K]

5000 m 15000m 35000m 45000m 10000m

Position along pipe [m]

Well head FPSO

No-touch Injection Recirculation Production Production Repair Hydrate formation temperature

31 / 37

slide-34
SLIDE 34

Example of outputs

  • Heated line

318 320 322 324 326 328 330 332 334 Time [s] 20 000 40 000 60 000 80 000 100 000 120 000 140 000 160 000 Temperature in the production line [K]

5000 m 25000m 35000m 45000m 15000m

Position along pipe [m]

Well head FPSO

Production No-touch Repair/Heating Heating 32 / 37

slide-35
SLIDE 35

Example of outputs

  • Comparison of diesel consumption

◮ Hybrid loop

1 000 2 000 3 000 4 000 5 000 6 000 7 000 Time [s] 50 000 100 000 150 000 200 000 250 000 300 000 350 000 Diesel volume in diesel tank [m3]

No-touch Injection Recirculation Production Production Repair

◮ Heated line

4.8 5 5.2 5.4 5.6 5.8 6 6.2 Time [s] 20 000 40 000 60 000 80 000 100 000 120 000 140 000 160 000 Diesel volume in the diesel tank [m3]

Production No-touch Repair/Heating Production

33 / 37

slide-36
SLIDE 36

Example of outputs of the physics simulation

  • Comparison of power consumption: temperature-controlled heating

system vs. open-loop heating system

Well head

310 315 320 325 330 335 340 345 350 355 20,000 40,000 60,000 80,000 100,000 120,000 140,000 160,000

Time [s] T emperature inside the pipe segments [K]

50000m 45000m 40000m 35000m 30000m 25000m 20000m 15000m 10000m 5000m 5000m 10000m 15000m 20000m 25000m 30000m 35000m 40000m 45000m 50000m Well head FPSO

Open-loop system Closed-loop system Reference temperature

No-touch Repair/heating Production Production

FPSO 500,000 1e+06 1.5e+06 2e+06 2.5e+06 20,000 40,000 60,000 80,000 100,000 120,000 140,000 160,000

Time [s] T

  • tal instantaneous power [W]

Open-loop system Closed-loop system

34 / 37

slide-37
SLIDE 37

Results of the stochastic simulation

  • The physics simulation provides some of the values corresponding to

each state: production volume, diesel consumption

  • The values are used by the stochastic simulation to compute

quantities of interest such as costs and gains

35 / 37

slide-38
SLIDE 38

Example of output from Monte-Carlo simulation

Figure : Comparison of S-curves for 1000 Monte-Carlo runs

36 / 37

slide-39
SLIDE 39

Conclusion

  • A set of models to simulate simplified test-cases has been

developed

  • Using Modelica to describe the physical model makes their

extension easy, even for non-programmers

  • Risk simulation helps to compare the reliability of two

designs

  • The fluid model is still very simple: large place for

improvement (dynamic model, phase change, energy exchange between phases)

  • Can the micro and macro levels of the risk simulation be

combined?

37 / 37