unstructured grid

162 views
Skip to first unread message

tvs teja

unread,
Jan 20, 2025, 1:39:17 PM1/20/25
to pflotran-users
Hi,

I am new to Pflotran, I have learned a lot from the examples shared in Pflotran documentation and a few solved cases. But now I have been assigned a geographical site for which I have to simulate for Co2 sequestration, and the domain coordinates are in 3d grdecl format; I have converted that grdecl file to a data file. Now, what is the syntax for running this .dat file, and what steps do I need to follow in case of an unstructured grid?

Could you please provide guidance?

Thanks and Regards,
Sai teja.T 

Nole, Michael

unread,
Jan 20, 2025, 2:13:53 PM1/20/25
to pflotra...@googlegroups.com

Sai,

 

We just added a feature today to read grdecl format files. This feature is new and has not yet been extensively tested. But if you pull the latest version of master, in the GRID block you can use TYPE ECLIPSE <.grdecl file> to read in the grdecl file.

 

This reads in the grdecl file as an EXPLICIT_UNSTRUCTURED grid. To visualize snapshot file output, you might want to add the PRINT_PRIMAL_GRID option to your OUTPUT block.

 

If you are using a well model, this should work in serial. We are still working on rolling out the well model in parallel for explicit unstructured grids.

 

Michael

 

 

From: pflotra...@googlegroups.com <pflotra...@googlegroups.com> on behalf of tvs teja <tvst...@gmail.com>
Date: Monday, January 20, 2025 at 10:39
AM
To: pflotran-users <pflotra...@googlegroups.com>
Subject: [pflotran-users: 8218] unstructured grid

Check twice before you click! This email originated from outside PNNL.

 

--
You received this message because you are subscribed to the Google Groups "pflotran-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pflotran-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pflotran-users/aad01395-6705-4634-af53-eab8cb432455n%40googlegroups.com.

tvs teja

unread,
Jan 24, 2025, 9:54:22 AM1/24/25
to pflotra...@googlegroups.com
Hi,
I am using pflotran from Oracle virtual box is the new version of pflotran updated there for using grdecl file format for uploading domain.

Thanks and regards,
Sai teja

Nole, Michael

unread,
Jan 24, 2025, 10:04:38 AM1/24/25
to pflotra...@googlegroups.com

Likely not. You will need to pull the latest version of the code and recompile. It will look something like this:

 

In a terminal:

 

cd $PFLOTRAN_DIR

git checkout master

git pull

cd src/pflotran

make clean && make pflotran -j2

 

Michael

 

tvs teja

unread,
Jan 25, 2025, 2:00:06 AM1/25/25
to pflotra...@googlegroups.com
Hi,
i have tried to use eclipse for reading unstructured domain the grdecl file has already 64 rows,118 columns and 64 layers and z coordinate directions are given for pillars and corners and porosity and permeability data is also given already in grdecl file, so i am trying to adjust the code and make changes in co2 sequestration example in pflotran.
so i can omit material properties and domain which were defined manually in below code right?
SIMULATION

  SIMULATION_TYPE SUBSURFACE

  PROCESS_MODELS

    SUBSURFACE_FLOW flow

      MODE MPHASE

    /

  /

END



SUBSURFACE



#=========================== numerical methods ================================

NUMERICAL_METHODS FLOW



  TIMESTEPPER

    TS_ACCELERATION 8

  /



  NEWTON_SOLVER

    ATOL 1D-12

    RTOL 1D-8

    STOL 1D-30

    ITOL 1D-7

    MAXIMUM_NUMBER_OF_ITERATIONS 25

  /



END



#=== make sure CO2_DATABASE points to the right path =========================

CO2_DATABASE ../../../database/co2data0.dat



#=========================== discretization ===================================

GRID

  TYPE ECLIPSE </home/user/Downloads/SAMPLE.grdecl>

  /

END



#=========================== solver options ===================================





#=========================== times ============================================

TIME

  FINAL_TIME 1.d2 y

  INITIAL_TIMESTEP_SIZE 1.d-8 y

  MAXIMUM_TIMESTEP_SIZE 2.5d1 y

  #MAXIMUM_TIMESTEP_SIZE 2.d0 y at 50. y

  #MAXIMUM_TIMESTEP_SIZE 25.d0 y at 1000. y

/



#=========================== output options ===================================

OUTPUT

  PRINT_PRIMAL_GRID

  MASS_BALANCE

  TIMES y 1.e-6 0.5 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 12. 14. 16. 18. 19. 19.25 19.5 19.75 20. \

  20.25 20.5 20.75 21. 22. 24. 26. 28. 30. 35. 40. 45. 50. 60. 70. 80. 90. 100.

  #FORMAT TECPLOT POINT

  FORMAT HDF5

/



#=========================== fluid properties =================================

FLUID_PROPERTY

  DIFFUSION_COEFFICIENT 1.d-9

/



#=========================== material properties ==============================

MATERIAL_PROPERTY formation

  ID 1

  POROSITY 0.15d0

  TORTUOSITY 1.d0

  ROCK_DENSITY 2.65d3

  SPECIFIC_HEAT 1.d3

  THERMAL_CONDUCTIVITY_DRY 2.5

  THERMAL_CONDUCTIVITY_WET 2.5

  SATURATION_FUNCTION sf2

  PERMEABILITY

    PERM_X 2.e-14

    PERM_Y 2.e-14

    PERM_Z 2.e-14

  /

/



MATERIAL_PROPERTY caprock

  ID 2

  POROSITY 0.01d0

  TORTUOSITY 1.d0

  ROCK_DENSITY 2.65d3

  SPECIFIC_HEAT 1.d3

  THERMAL_CONDUCTIVITY_DRY 2.5

  THERMAL_CONDUCTIVITY_WET 2.5

  SATURATION_FUNCTION sf2

  PERMEABILITY

    PERM_X 1.e-17

    PERM_Y 1.e-17

    PERM_Z 1.e-17

  /

/



MATERIAL_PROPERTY overburden

  ID 3

  POROSITY 0.15d0

  TORTUOSITY 1.d0

  ROCK_DENSITY 5.d3

  SPECIFIC_HEAT 1.d3

  THERMAL_CONDUCTIVITY_DRY 2.5

  THERMAL_CONDUCTIVITY_WET 2.5

  SATURATION_FUNCTION sf2

  PERMEABILITY

    PERM_X 2.e-14

    PERM_Y 2.e-14

    PERM_Z 2.e-14

  /

/



MATERIAL_PROPERTY basement

  ID 4

  POROSITY 0.1d0

  TORTUOSITY 1.d0

  ROCK_DENSITY 2.65d3

  SPECIFIC_HEAT 1.d3

  THERMAL_CONDUCTIVITY_DRY 2.5

  THERMAL_CONDUCTIVITY_WET 2.5

  SATURATION_FUNCTION sf2

  PERMEABILITY

    PERM_X 1.e-16

    PERM_Y 1.e-16

    PERM_Z 1.e-16

  /

/



#=========================== saturation functions =============================

SATURATION_FUNCTION sf2

  PERMEABILITY_FUNCTION_TYPE MUALEM

  SATURATION_FUNCTION_TYPE VAN_GENUCHTEN

  RESIDUAL_SATURATION LIQUID_PHASE 0.1

  RESIDUAL_SATURATION GAS_PHASE 0.0

  LAMBDA 0.762d0

  ALPHA 7.5d-4

  MAX_CAPILLARY_PRESSURE 1.d6

/



#=========================== regions ==========================================

REGION all

  COORDINATES

    0.d0 0.d0 0.d0

    2500.d0 2500.d0 1000.d0

  /

END



REGION top

  FACE TOP

  COORDINATES

    0.d0 0.d0 1000.d0

    2500.d0 2500.d0 1000.d0

  /

END



REGION bottom

  FACE BOTTOM

  COORDINATES

    0.d0 0.d0 0.d0

    2500.d0 2500.d0 0.d0

  /

END



REGION east

  FACE EAST

  COORDINATES

    2500.d0 0.d0 0.d0

    2500.d0 2500.d0 1000.d0

  /

END



REGION west

  FACE WEST

  COORDINATES

    0.d0 0.d0 0.d0

    0.d0 2500.d0 1000.d0

  /

END



REGION north

  FACE NORTH

  COORDINATES

    0.d0 2500.d0 0.d0

    2500.d0 2500.d0 1000.d0

  /

END



REGION south

  FACE SOUTH

  COORDINATES

    0.d0 0.d0 0.d0

    2500.d0 0.d0 1000.d0

  /

END



REGION basement

  COORDINATES

    0.d0 0.d0 0.d0

    2500.d0 2500.d0 400.d0

  /

END



REGION formation

  COORDINATES

    0.d0 0.d0 400.d0

    2500.d0 2500.d0 500.d0

  /

END



REGION caprock

  COORDINATES

    0.d0 0.d0 500.d0

    2500.d0 2500.d0 600.d0

  /

END



REGION overburden

  COORDINATES

    0.d0 0.d0 600.d0

    2500.d0 2500.d0 1000.d0

  /

END



REGION well

  COORDINATES

    1250.d0 1250.d0 400.d0

    1250.d0 1250.d0 500.d0

  /

END



REGION obs

  COORDINATES

    1250.d0 1250.d0 500.d0

    1250.d0 1250.d0 500.d0

  /

END


Nole, Michael

unread,
Jan 25, 2025, 10:54:19 AM1/25/25
to pflotra...@googlegroups.com
Yes, right now you can delete permeabilities and porosities and have them written by the GRDECL file.

Michael

On Jan 24, 2025, at 11:00 PM, tvs teja <tvst...@gmail.com> wrote:



tvs teja

unread,
Jan 27, 2025, 2:17:01 PM1/27/25
to pflotran-users
Hi,
i have attached the code below with eclipse implementation for grdecl file.  There is an error while running the code. Could you please have a look over the code and let me know where the errors are?
SIMULATION

  SIMULATION_TYPE SUBSURFACE

  PROCESS_MODELS

    SUBSURFACE_FLOW flow

      MODE MPHASE

    /

  /

END
SUBSURFACE
#=========================== numerical methods ================================

NUMERICAL_METHODS FLOW



  TIMESTEPPER

    TS_ACCELERATION 8

  /



  NEWTON_SOLVER

    ATOL 1D-12

    RTOL 1D-8

    STOL 1D-30

    ITOL 1D-7

    MAXIMUM_NUMBER_OF_ITERATIONS 25

  /

END

#=========================== discretization ===================================

GRID

TYPE ECLIPSE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

GRAVITY 0 0 9.81099

END



#==========================chemistry ===================================

CHEMISTRY# =========#(Specifies geochemistry details for multicomponent transport.)

  PRIMARY_SPECIES#====#(List of primary aqueous or basis species for which concentrations will be solved.)

    H2O

    H+

    CO2(aq)

  /



  SECONDARY_SPECIES#=====#(List of secondary aqueous species or complexes.)

    OH-

    HCO3-  

    CO3--

 /

ACTIVE_GAS_SPECIES

    CO2(g)

/

PASSIVE_GAS_SPECIES

    CO2(g)

 /

    LOG_FORMULATION #=====(Flag for solving Newton-Raphson equations with derivatives computed with respect to the logarithm (base 10) of the concentrations.)

    UPDATE_POROSITY

    UPDATE_PERMEABILITY

    !ACTIVITY_COEFFICIENTS#==================(Activity coefficients are printed for primary species.)

MOLAL

  CO2_DATABASE ../../../database/co2data0.dat

  !LOG_FORMULATION

  !ACTIVITY_COEFFICIENTS NEWTON NEWTON_ITERATION#============(iterative Newton-based updated (iterates until convergence tolerance is satisfied))

  OUTPUT

    TOTAL#=====(Total aqueous component concentration of each species is printed.)

    ALL #=====(All primary species, mineral species, sorbed species (i.e. colloids, surface complexes, surface sites if applicable) and pH (if applicable) are printed in output.)

    PH

    HCO3-

    H+

    SECONDARY_SPECIES

    CO2(aq)

    OH-

    CO3--

    GASES

    MINERALS

    !PH

    KD

    COLLOIDS

    TOTAL

    TOTAL_SORBED

    TOTAL_SORBED_MOBILE

    FREE_ION

    ACTIVITY_COEFFICIENTS

    MOLARITY

    MOLALITY

    AGE

    !SITE_DENSITY

    PRINT_PRIMAL_GRID

    FORMAT HDF5

  /

END

#=======================constraint===============================



CONSTRAINT formation

   CONCENTRATIONS

  #species_name concentration constraint_type constraint_species

    !Tracer 100.0 T

    !HCO3- 0.00433 T !CO2(g)

    H+ 5.6 pH

    CO2(aq) 0.001   T  G CO2(g)

    H2O 52.02 T

    !O2(aq) 0.001   T

 /

/



CONSTRAINT injection

  CONCENTRATIONS

  #species_name concentration constraint_type constraint_species

    !Tracer 100.0 T

    !HCO3- 0.00433 T !CO2(g)

    H+ 5.6 pH

    CO2(aq) 0.001   T G CO2(g)

    H2O 52.02 T

    !O2(aq) 0.001   T      

 /

/


#=========================== times ============================================

TIME

  FINAL_TIME 1.d2 y

  INITIAL_TIMESTEP_SIZE 1.d-8 y

  MAXIMUM_TIMESTEP_SIZE 2.5d1 y

  #MAXIMUM_TIMESTEP_SIZE 2.d0 y at 50. y

  #MAXIMUM_TIMESTEP_SIZE 25.d0 y at 1000. y

/



#=========================== output options ===================================

OUTPUT

 

  MASS_BALANCE

  TIMES y 1.e-6 0.5 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 12. 14. 16. 18. 19. 19.25 19.5 19.75 20. \

  20.25 20.5 20.75 21. 22. 24. 26. 28. 30. 35. 40. 45. 50. 60. 70. 80. 90. 100.

  #FORMAT TECPLOT POINT

 

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

END



REGION top

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

FACE TOP

END

REGION bottom

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

FACE BOTTOM

END

REGION east

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

FACE EAST

END



REGION west

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

FACE WEST

END



REGION north

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

FACE NORTH

END



REGION south

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

FACE SOUTH

END

REGION formation

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

END



REGION caprock

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

END

REGION overburden

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

END

REGION well

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

END

REGION obs

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

END



REGION basement

FILE </home/user/pflotran/regression_tests/shortcourse/co2 (copy)/SAMPLE.grdecl>

END





#=========================== observation points ===============================

OBSERVATION obs

  REGION obs

  AT_CELL_CENTER

  VELOCITY

END





#=========================== flow conditions ==================================

FLOW_CONDITION initial

  UNITS Pa,C,M,yr

  TYPE

    LIQUID_PRESSURE HYDROSTATIC

    TEMPERATURE DIRICHLET

    CONCENTRATION DIRICHLET

    ENTHALPY DIRICHLET

  /

  DATUM 0.d0 0.d0 1000.d0

  GRADIENT

    TEMPERATURE 0.d0 0.d0 -0.025d0

  /

PRESSURE 77.0D5 77.0D5    

TEMPERATURE 75.

CONCENTRATION 0.d0

ENTHALPY 0.d0 0.d0

/



FLOW_CONDITION src

  #UNITS Pa,C,M,yr

  SYNC_TIMESTEP_WITH_UPDATE

  TYPE

    RATE mass_rate

    LIQUID_PRESSURE DIRICHLET

    TEMPERATURE DIRICHLET

    CONCENTRATION DIRICHLET

    ENTHALPY DIRICHLET

  /

  RATE LIST

    TIME_UNITS y

    DATA_UNITS kg/s

    0.  0. 10.d0

    20. 0. 0.

  /

  LIQUID_PRESSURE 2.d7 2.d7

  TEMPERATURE 75.d0

  CONCENTRATION 1.d-16

  ENTHALPY 0.d0 0.d0

/


#=========================== condition couplers ===============================

# initial condition

INITIAL_CONDITION

  FLOW_CONDITION initial

  REGION all

END



# east boundary condition

BOUNDARY_CONDITION east

  FLOW_CONDITION initial

  REGION east

END



# west boundary condition

BOUNDARY_CONDITION west

  FLOW_CONDITION initial

  REGION west

END



# north boundary condition

BOUNDARY_CONDITION north

  FLOW_CONDITION initial

  REGION north

END



# south boundary condition

BOUNDARY_CONDITION south

  FLOW_CONDITION initial

  REGION south

END



# top boundary condition

BOUNDARY_CONDITION top

  FLOW_CONDITION initial

  REGION top

END



# bottom boundary condition

BOUNDARY_CONDITION bottom

  FLOW_CONDITION initial

  REGION bottom

END



SOURCE_SINK src

  FLOW_CONDITION src

  REGION well

END



#=========================== stratigraphy couplers ============================

STRATA

  REGION formation

  MATERIAL formation

END



STRATA

  REGION caprock

  MATERIAL caprock

END

STRATA

  REGION overburden

  MATERIAL overburden

END

STRATA

  REGION basement

  MATERIAL basement

END

END_SUBSURFACE

eclipse.PNG

Nole, Michael

unread,
Jan 27, 2025, 3:05:45 PM1/27/25
to pflotra...@googlegroups.com

I think your version is out of date. In $PFLOTRAN_DIR/src/pflotran:

 

git checkout master

git pull

make clean

make pflotran

 

Michael

 

 

tvs teja

unread,
Jan 29, 2025, 1:59:46 PM1/29/25
to pflotra...@googlegroups.com
Hi,
I have updated the version as per the trailing mail, but still there is an error message as ECLIPSE is not recognized and I have added code along with the mail. Could you please let me know what changes needed to be done?

pflotran.in

Nole, Michael

unread,
Jan 29, 2025, 2:55:44 PM1/29/25
to pflotra...@googlegroups.com

I recommend taking a look at the regression test here:

 

https://bitbucket.org/pflotran/pflotran/src/master/regression_tests/co2/co2-eclipse-np2.in

 

Try running that in your PFLOTRAN regression test directory first to make sure you have the most up to date version of the code installed. Then, I recommend you add your specific inputs from there.

 

Hope this helps,

 

Michael

 

tvs teja

unread,
Feb 1, 2025, 2:30:20 PM2/1/25
to pflotra...@googlegroups.com
Hi,
I am not able to understand why the Eclipse or SC02 function is not running; I think I am using an outdated Eclipse or SC02 function are not running. I think I am using an outdated version of Plotran, but I need everything that you have suggested to update Plotran in Oracle Virtual Box version of Plotran. I need everything that you have suggested to update the Plotran in Oracle Virtual Box. Could you suggest any other ways to update the pflotran version. https://bitbucket.org/pflotran/pflotran/src/master/regression_tests/co2/co2-eclipse-np2.in  in bit bucket there is pflotran repository which contain src files can i copy that files in oracle virtual box and run the code

sc1.PNG

Nole, Michael

unread,
Feb 1, 2025, 3:49:43 PM2/1/25
to pflotra...@googlegroups.com
I'm not sure which version of the virtual machine you're using. You could try downloading a recent one here:


You will still need to pull the latest updates and recompile to use the Eclipse reader. In a terminal:

cdpf (or cd ~/software/pflotran/src/pflotran)
git checkout master
git pull
make clean
make pflotran

Hope this helps. We'll be uploading some additional documentation to that Zenodo site soon.

Michael

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages