[SOLVED] Non-stationary PluriGaussian Simulation

If you have problems using RGeostats package or if you simply need some help on an unlisted subject.

[SOLVED] Non-stationary PluriGaussian Simulation

Postby jseelig » Fri Nov 07, 2014 9:58 am

Hi,

I want to use plurigaussian simulation to create a model with five facies. Two of them should be non-stationary (proportion linear increasing with z-coordinate). So I created a database for the proportions and added five vectors with the proportions to it. However, I always get the message "Number of Facies inconsistent between Rule (5) and DbProp (4)". I mostly followed the tutorial for PGS. It worked without dbprop in simpgs but then the proportions where stationary. Why does Dbprop only contain 4 facies?

Code: Select all
library(RGeostats)
outgrid2 <- db.create(flag.grid=TRUE,x0=c(0,0,0),nx=c(40,40,50),dx=c(500,500,50))
Dbprop <- db.create(flag.grid=TRUE,x0=c(0,0,0),nx=c(40,40,50),dx=c(500,500,50))
Dbprop <- db.add(Dbprop,Prop2=0.1)
Dbprop <- db.add(Dbprop,Prop3=0.1)
Dbprop <- db.add(Dbprop,Prop5=0.3*(x3/50))
Dbprop <- db.add(Dbprop,Prop6=0.3*(x3/50))
Dbprop <- db.add(Dbprop,Prop1=1-Prop2-Prop3-Prop5-Prop6)
Dbprop <- db.locate(Dbprop,seq(4,7),loctype="p")
pal4fac <- c("red","orange","green","blue","gray")
rule4fac <- rule.create(c("T","S","F3","T","T","F1","F2","F4","F5"))
plot (rule4fac,col=pal4fac)
modY1 <- model.input(ndim=3)
1
4
1
y
n
10000
10000
10
modY2 <- model.input(ndim=3)
1
4
1
y
n
10000
10000
10
outgrid2<- simpgs(dbout=outgrid2, dbprop = Dbprop, rule=rule4fac, model1=modY1, model2=modY2, nbsimu=1,nbtuba=25,seed=126543)
db.write.format(outgrid2, mode="eclipse", file="1-001_RGeostats.grdecl", must.noproj=TRUE, nsamplex=1, nsampley=1, nmult=1, flag.low=0, flag.high=1, valmin=1, valmax=4, append =FALSE, ncolor=NA, red=NA, green=NA, blue=NA, mask_red=0, mask_green=0, mask_blue=0, ffff_red=232, ffff_green=232, ffff_blue=0, low_red =255, low_green =255, low_blue =255, high_red=255, high_green=0, high_blue=0, sep=",", dec=".")
jseelig
 
Posts: 2
Joined: Fri Nov 07, 2014 9:44 am

Re: Non-stationary PluriGaussian Simulation

Postby Nicolas Desassis » Fri Nov 07, 2014 10:27 am

Hi,

thank for you interest in RGeostats.

I think that your problem comes from the line:

Code: Select all
Dbprop <- db.locate(Dbprop,seq(4,7),loctype="p")


Indeed, if you display the database after this operation,
you have:

Code: Select all
> Dbprop

Data Base Characteristics
=========================

Data Base Summary
-----------------
File is organized as a regular grid
Space dimension              = 3
Number of fields             = 9
Maximum Number of attributes = 9
Total number of samples      = 80000
Grid characteristics:
Origin :     0.000     0.000     0.000
Mesh   :   500.000   500.000    50.000
Number :        40        40        50

Variables
---------
Field =  1 - Name    =  rank - Locator =  rank
Field =  2 - Name    =  x1 - Locator =  x1
Field =  3 - Name    =  x2 - Locator =  x2
Field =  4 - Name    =  x3 - Locator =  p1
Field =  5 - Name    =  Prop2 - Locator =  p2
Field =  6 - Name    =  Prop3 - Locator =  p3
Field =  7 - Name    =  Prop5 - Locator =  p4
Field =  8 - Name    =  Prop6 - Locator =  NA
Field =  9 - Name    =  Prop1 - Locator =  z1


It indicates that you have a 2 coordinates variables (x1 and x2), 4 proportions variables (x3, Prop2, Prop3 and Prop5) and on variable with locator "z" (Prop1).

I think you wanted to write:


Code: Select all
Dbprop <- db.locate(Dbprop,seq(5,9),loctype="p")


Does it solve your problem?

Regards,

Nicolas
Nicolas Desassis
 
Posts: 198
Joined: Thu Sep 20, 2012 4:22 pm

Re: Non-stationary PluriGaussian Simulation

Postby jseelig » Mon Nov 10, 2014 1:25 pm

Thank you. That solved the problem with the number of facies. But now it shows up, that the proportions are wrong. I want to have the proportions of facies 2 and 3 constant with 0.1 along the 3rd axis (z-direction). The proportions of facies 5 and 6 should each decrease linear from 0.3 at the top to 0 at the bottom. Facies 1 should get the rest. So the resulting overall proportions are 0.1 for facies 2 and 3, 0.15 for facies 5 and 6. Facies 1 gets a proportion of 0.5.
Does the variable x3 stand for the node in z-direction? If yes, I could divide it by the total amount of nodes in that direction to get 0 respective 0.3 at the ends.

Code: Select all
Dbprop <- db.add(Dbprop,Prop2=0.1)
Dbprop <- db.add(Dbprop,Prop3=0.1*(1-Prop2))
Dbprop <- db.add(Dbprop,Prop5=0.3*(x3/50)*(1-Prop2-Prop3))
Dbprop <- db.add(Dbprop,Prop6=0.3*(x3/50)*(1-Prop2-Prop3-Prop5))
Dbprop <- db.add(Dbprop,Prop1=1-Prop2-Prop3-Prop5-Prop6)
jseelig
 
Posts: 2
Joined: Fri Nov 07, 2014 9:44 am


Return to Other Troubleshooting

Who is online

Users browsing this forum: No registered users and 7 guests

cron