SPECIFIED_VELOCITY card

268 views
Skip to first unread message

Hammond, Glenn E

unread,
May 21, 2018, 9:02:58 PM5/21/18
to pflotra...@googlegroups.com

All,

 

In refactoring the code to add gas transport (now merged to the master branch), I revised the way uniform (and non-uniform for the experts out there) velocities are read from the input file.  You can refer to the attached .rst file (which will eventually be added to the online documentation) or regression tests in PFLOTRAN_DIR/regression_tests/default/velocity for examples on how to use the new format.  This updated approach allows us to leverage the standard dataset class to store velocities, instead of using an object specifically assigned to velocities, which resulted in duplicate code.  Just trying to ease maintenance.

 

Glenn

specified_velocity_card.rst

Peter Alt-Epping

unread,
May 23, 2018, 9:48:26 AM5/23/18
to pflotra...@googlegroups.com
Hello all,

I noticed that in reactive_transport_aux.F90 the
aux%rt_parameter%diffusion_coefficient pointer is set to 1e-9 for liquid
and gas phase . Just wondering if there is a reason why the gas
diffusion coeffcient is not set explicitly.

Thanks,

Peter


--
______________________________________
Dr. Peter Alt-Epping
University of Bern
Institute of Geological Sciences
Baltzerstrasse 3
3012 Bern
Switzerland

T: 0041 31 631 4531
F: 0041 31 631 4843

Hammond, Glenn E

unread,
May 23, 2018, 11:35:07 AM5/23/18
to pflotra...@googlegroups.com
Peter,

These are the defaults. We could make the default for the gas phase a larger value (e.g. 1.d-5). With the new gas transport capability that I merged earlier this week, you can use the following block to explicitly set species-dependent diffusion coefficients for the aqueous and gas phases.

AQUEOUS_DIFFUSION_COFFICIENTS
O2(aq) 2.d-9
CO2(aq) 1.d-9
/

GAS_DIFFUSION_COFFICIENTS
O2(g) 2.d-5
CO2(g) 1.d-5
/

Unfortunately, I do not have a regression test example committed at this time. I was working on this capability back in early February and it had to be set to the side for other commitments. A few weeks ago, I saw that the gas transport branch had fallen behind. Out of fear of losing the enhancements, I merged them with the master. Now, I wish I had not, in favor of merging master to the gas transport branch, until documentation and regression tests are in place. But note that the gas transport is still under development...once I can get back to it.

Glenn

Peter Alt-Epping

unread,
May 23, 2018, 11:46:58 AM5/23/18
to pflotra...@googlegroups.com
Hi Glenn,

Thanks for the information! I think this new capability is very useful.

I am currently running a comparison FLOTRAN-PFLOTRAN involving gas
diffusion and I get very similar results.

Cheers,

Peter

Joan Govaerts

unread,
Nov 21, 2019, 9:23:20 AM11/21/19
to pflotran-users
After digging through the user group archive, I was able to import velocities from a Navier-Stokes solver into PFLOTRAN.  It was a combination of Glenn and Paolo Trinchero's comments that got me on the right track.  It could be interesting to add this to the user manual (preferably in better English):

Velocities are provided via HDF5 files, which contain three arrays (for the three velocity components) that hold values for each cell face (upwind direction). 
As such, it contains three cell-indexed datasets: ‘Internal Velocity X’, ‘Internal Velocity X’, and ‘Internal Velocity Z’.
Additionally, for each boundary another full array (referring to the name of the boundary condition) with velocity values is required. This means that most values will be zero, 
only the boundary cells will have a non-zero value.
This capability only works for Cartesian grids.

if interested, I could provide input and H5 files of a simple 2D example problem.

Joan


Op dinsdag 22 mei 2018 03:02:58 UTC+2 schreef Hammond, Glenn E:

Edwin Saavedra Cifuentes

unread,
Nov 2, 2020, 7:39:20 PM11/2/20
to pflotran-users
Hello,

[ TL,DR: Is there any chance you can share the 2D example problem mentioned in this thread? ]

I'm trying to use the steady-state solution of the RICHARDS FLOW solver and use it as an SPECIFIED_VELOCITY when running a TRANSPORT simulation. It sounds silly to uncouple both processes, but the goal here is just to Monte Carlo some chemistry parameters. My approach is to use the HDF5 file that comes from the OUTPUT card (particularly the results of VELOCITY_AT_FACE) of the last SNAPSHOT in the flow simulation and convert it to a HDF5 DATASET that can be read by the SPECIFIED_VELOCITY card.

I'm stuck in completing the HDF5 dataset,  for example, in a grid with N = nX * nY * nZ cells, the velocities at the faces are exported as 3-dimensional arrays with sizes (nX-1)*nY*nZ for Liquid X-Flux Velocities, nX*(nY-1)*nZ for Liquid Y-Flux Velocities, and nX*nY*(nZ-1) for  Liquid Z-Flux Velocities'. Thus, nX+nY+nZ velocity values need still to be defined, which as I understand they correspond to the boundary conditions.

My question would be, how would you complete this HDF5 dataset and link those different-sized arrays with the 'Cell Ids' array?

(Also, do you know if there is maybe a simpler way to do this?)

- Edwin

Joan Govaerts

unread,
Nov 3, 2020, 4:28:24 AM11/3/20
to pflotran-users

Edwin Saavedra Cifuentes

unread,
Nov 3, 2020, 3:59:43 PM11/3/20
to pflotran-users
Thanks Joan!

Turns out all datasets in the HDF5 file must be arrays of size (nx*ny*nz) × 1, even the ones for the boundary conditions!
Saving the NATURAL_ID field in the output from the flow simulation was helpful for tracking the jump between gridded datasets and cell-indexed ones.

- Edwin

Zitong Zhou

unread,
May 25, 2021, 4:20:12 AM5/25/21
to pflotran-users
Hi Joan,
Thank you for the example you provided in the link, in the .in file, I saw that the discretization is 100*100*100, but in the h5 file, there are 40000 cells, what was the dimension of the 40000 cells in 3D?

Joan Govaerts

unread,
May 25, 2021, 4:54:09 AM5/25/21
to pflotran-users
Hi Zitong, 
Yes, it should be a 2D - 200 *1* 200 problem.  I have updated the files on https://drive.google.com/drive/folders/1OAF2OHW0Kxwrnw7rhHD7wvVmpvSA8CBj 

Op dinsdag 25 mei 2021 om 10:20:12 UTC+2 schreef Zitong Zhou:

Zitong Zhou

unread,
May 25, 2021, 12:12:50 PM5/25/21
to pflotran-users
Thank you very much! It agrees with the .in file now.
Reply all
Reply to author
Forward
0 new messages