In [2]:
%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) {
    return false;
}
In [3]:
# Import packages
from flumyx import *

# Just a function which displays the Flumy version currently loaded
def printVersion(simu):
    old_tl = simu.getTracer().getTraceLevel()
    simu.getTracer().setTraceLevel(TL_DEBUG)
    simu.printVersion()
    simu.getTracer().setTraceLevel(old_tl)
In [4]:
# Fluvial simulation parameters
trace_level = TL_WARNING # 0: None, 1: Fatal, 2: Error, 3: Warning, 4: Info, 5: Debug

#          PARAMETER KEY       VALUE
params = {KEY_CHNL_MAX_DEPTH:  3,
          KEY_CHNL_WAVELENGTH: 400}
    
# Simulation root seed
seed = 665544

# Well files (adapt the path to the files if needed)
wells = {"well1": "../../data/fluvial/w_125_65.flw",  # Well with UDF at the top and the bottom
         "well2": "../../data/fluvial/w_180_125.flw"} # Well with a small UDF near the bottom

# Create simulator and show Flumy version
simu = iSimulator.createSimulator()
printVersion(simu)

# Fluvial simulation
simu.getParameters().setUsingFluvi()

# Verbose conditioning
#trace_level = TL_DEBUG
#simu.getTracer().setTraceCond(True)
Flumy (8.000) / 2025-02-04
In [5]:
# Reset the simulation (return at age 0)
simu.clear()

# Launch the simulation up to 9m thickness
print("Running simulation...")
runFlumy(simu, 0, seed, params, zul=9, trace_level=trace_level, wellFiles=wells)
print("Simulation finished!")
Running simulation...
Simulation finished!
In [6]:
# Get the 3D regular block
fac,grain,age = simu.getBlock(0.1, zb=0, zt=6)

# Display Facies cross-flow section
showSection(fac = fac[50,:,:], size=8, legend=1)

# Display Grain Size along-flow section
showSection(grain = grain[:,20,:], size=8, legend=2)

# Display Age horizontal slice section
showSection(age = age[:,:,2], size=8, legend=1, title="Age horizontal slice #2")
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
In [7]:
# Display Vertical Proportion Curve of the simulation 
showVPC(simu, 0.1, 0, 6) # VPC with level of 0.1m between 0m and 6m elevation
No description has been provided for this image
In [8]:
# Print conditioning statistics (for each well and globally)
dom = simu.getDomain()
stats = dom.getCondStats()
for s in stats:
    print(s.summary())
well1 [1240 640] [125 65]
               Data |       Simu |      Match
Bottom :       3.89 |      -1.06 |       3.89
Top    :      47.78 |       9.65 |       8.53
Length :       4.64 |       4.64 |       4.64
Sand   :       0.71 |       0.71 |       0.68
Channel:       0.71 |       0.74 |       0.71
MP/HP  :       0.00 |       0.03 |       0.00
LV     :       0.03 |       0.06 |       0.00
OB     :       0.26 |       0.20 |       0.20
WL/PL  :       0.00 |       0.00 |       0.00
Total  :       1.00 |       1.00 |       0.88

well2 [1790 1240] [180 125]
               Data |       Simu |      Match
Bottom :       0.00 |      -0.72 |       0.00
Top    :      50.00 |       9.48 |       8.74
Length :       8.06 |       8.74 |       8.06
Sand   :       0.90 |       0.41 |       0.39
Channel:       0.90 |       0.92 |       0.90
MP/HP  :       0.00 |       0.52 |       0.00
LV     :       0.02 |       0.05 |       0.00
OB     :       0.08 |       0.03 |       0.00
WL/PL  :       0.00 |       0.00 |       0.00
Total  :       1.00 |       1.00 |       0.39

Total
               Data |       Simu |      Match
Bottom :       0.00 |      -1.06 |       0.00
Top    :      50.00 |       9.65 |       8.74
Length :      50.00 |      10.71 |       8.74
Sand   :       0.83 |       0.51 |       0.50
Channel:       0.83 |       0.86 |       0.83
MP/HP  :       0.00 |       0.35 |       0.00
LV     :       0.02 |       0.05 |       0.00
OB     :       0.14 |       0.09 |       0.07
WL/PL  :       0.00 |       0.00 |       0.00
Total  :       1.00 |       1.00 |       0.57

In [9]:
# Print data information from a given input well (from top to bottom)
print(simu.getWellInfos(125,65))
  Well well1 [1240 640] [125 65]:
    Well bottom:           3.89
    Well top:              47.78
    Well wet:              0
    Domain elevation:      9.65
    Active level:          8.53
    Active sample bottom:  8.53
       Sample #1:   CL (1) : [47.68 => 47.78] - th=0.1
       Sample #2:   PB (2) : [47.56 => 47.68] - th=0.12
       Sample #3:   CL (1) : [47.48 => 47.56] - th=0.08
       Sample #4:   PB (2) : [44.32 => 47.48] - th=3.16
       Sample #5:   SP (3) : [43.78 => 44.32] - th=0.54
       Sample #6:   PB (2) : [40.61 => 43.78] - th=3.17
       Sample #7:   CL (1) : [40.51 => 40.61] - th=0.1
       Sample #8:   PB (2) : [40.39 => 40.51] - th=0.12
       Sample #9:   CL (1) : [40.37 => 40.39] - th=0.02
       Sample #10:  PB (2) : [40.23 => 40.37] - th=0.14
       Sample #11:  LV (7) : [39.93 => 40.23] - th=0.3
       Sample #12:  OB (8) : [39.78 => 39.93] - th=0.15
       Sample #13:  WL (11) : [39.77 => 39.78] - th=0.01
       Sample #14:  OB (8) : [39.49 => 39.77] - th=0.28
       Sample #15:  WL (11) : [39.46 => 39.49] - th=0.03
       Sample #16:  OB (8) : [38.21 => 39.46] - th=1.25
       Sample #17:  LV (7) : [38.13 => 38.21] - th=0.08
       Sample #18:  OB (8) : [36.67 => 38.13] - th=1.46
       Sample #19:  WL (11) : [36.66 => 36.67] - th=0.01
       Sample #20:  OB (8) : [36.56 => 36.66] - th=0.1
       Sample #21:  WL (11) : [36.43 => 36.56] - th=0.13
       Sample #22:  OB (8) : [36.39 => 36.43] - th=0.04
       Sample #23:  WL (11) : [36.37 => 36.39] - th=0.02
       Sample #24:  OB (8) : [36.3 => 36.37] - th=0.07
       Sample #25:  WL (11) : [36.28 => 36.3] - th=0.02
       Sample #26:  OB (8) : [36.26 => 36.28] - th=0.02
       Sample #27:  WL (11) : [36.24 => 36.26] - th=0.02
       Sample #28:  OB (8) : [36.06 => 36.24] - th=0.18
       Sample #29:  WL (11) : [36.05 => 36.06] - th=0.01
       Sample #30:  OB (8) : [35.72 => 36.05] - th=0.33
       Sample #31:  LV (7) : [35.62 => 35.72] - th=0.1
       Sample #32:  OB (8) : [34.9 => 35.62] - th=0.72
       Sample #33:  LV (7) : [34.45 => 34.9] - th=0.45
       Sample #34:  OB (8) : [34.31 => 34.45] - th=0.14
       Sample #35:  LV (7) : [33.63 => 34.31] - th=0.68
       Sample #36:  PB (2) : [30.63 => 33.63] - th=3
       Sample #37:  MP (9) : [30.02 => 30.63] - th=0.61
       Sample #38:  SP (3) : [29.97 => 30.02] - th=0.05
       Sample #39:  PB (2) : [29.78 => 29.97] - th=0.19
       Sample #40:  CL (1) : [29.74 => 29.78] - th=0.04
       Sample #41:  PB (2) : [28.84 => 29.74] - th=0.9
       Sample #42:  CL (1) : [28.8 => 28.84] - th=0.04
       Sample #43:  PB (2) : [28.75 => 28.8] - th=0.05
       Sample #44:  MP (9) : [27.38 => 28.75] - th=1.37
       Sample #45:  SP (3) : [27.06 => 27.38] - th=0.32
       Sample #46:  PB (2) : [22.6 => 27.06] - th=4.46
       Sample #47:  LV (7) : [22.5 => 22.6] - th=0.1
       Sample #48:  PB (2) : [17.01 => 22.5] - th=5.49
       Sample #49:  OB (8) : [15.82 => 17.01] - th=1.19
       Sample #50:  LV (7) : [15.43 => 15.82] - th=0.39
       Sample #51:  OB (8) : [15.02 => 15.43] - th=0.41
       Sample #52:  LV (7) : [14.43 => 15.02] - th=0.59
       Sample #53:  OB (8) : [13.63 => 14.43] - th=0.8
       Sample #54:  LV (7) : [13.37 => 13.63] - th=0.26
       Sample #55:  OB (8) : [13.23 => 13.37] - th=0.14
       Sample #56:  MP (9) : [11.42 => 13.23] - th=1.81
       Sample #57:  SP (3) : [10.24 => 11.42] - th=1.18
       Sample #58:  MP (9) : [9.89 => 10.24] - th=0.35
    <<<Sample #59:  SP (3) : [8.53 => 9.89] - th=1.36
       Sample #60:  OB (8) : [7.31 => 8.53] - th=1.22
       Sample #61:  PB (2) : [4.31 => 7.31] - th=3
       Sample #62:  LV (7) : [4.19 => 4.31] - th=0.12
       Sample #63:  PB (2) : [3.96 => 4.19] - th=0.23
       Sample #64:  CL (1) : [3.89 => 3.96] - th=0.07

In [10]:
# Print the content of the corresponding simulation pillar (from top to bottom)
print(simu.extractWell(125, 65).debug_info())
  Core at X,Y,Z = [1240,640,9.65] :
    Sample #1:   OB(8) : [8.77 => 9.65] - height = 0.88 - length = 0.88
    Sample #2:   LV(7) : [8.71 => 8.77] - height = 0.06 - length = 0.06
    Sample #3:   OB(8) : [7.61 => 8.71] - height = 1.1 - length = 1.1
    Sample #4:   LV(7) : [7.33 => 7.61] - height = 0.28 - length = 0.28
    Sample #5:   PB(2) : [4.13 => 7.33] - height = 3.2 - length = 3.2
    Sample #6:   CL(1) : [4.05 => 4.13] - height = 0.08 - length = 0.08
    Sample #7:   PB(2) : [4.04 => 4.05] - height = 0.01 - length = 0.01
    Sample #8:   MP(9) : [1.8 => 4.04] - height = 2.24 - length = 2.24
    Sample #9:   PB(2) : [-1.06 => 1.8] - height = 2.86 - length = 2.86
In [ ]: