Code Monkey home page Code Monkey logo

lanl / fehm Goto Github PK

View Code? Open in Web Editor NEW
52.0 9.0 20.0 131.22 MB

Finite Element Heat and Mass Transfer Code

Home Page: https://fehm.lanl.gov

License: Other

Makefile 0.04% Batchfile 0.02% Python 1.14% GLSL 59.47% Tcl 0.01% Smarty 0.01% Fortran 38.35% Julia 0.05% Roff 0.90% C 0.02%
porous-flow simulation-modeling reactive-chemistry coupled-heat-mass multiphase-transport groundwater-modelling carbon-storage soil-vapor earth-science carbon-sequestration

fehm's Introduction

FEHM: Finite Element Heat and Mass Transfer Code

LANL Software: LA-CC-2012-083 No. C13022 LANL Documents: LA-UR-12-24493

Build Status

The numerical background of the FEHM computer code can be traced to the early 1970s when it was used to simulate geothermal and hot dry rock reservoirs. The primary use over a number of years was to assist in the understanding of flow fields and mass transport in the saturated and unsaturated zones below the potential Yucca Mountain repository. Today FEHM is used to simulate groundwater and contaminant flow and transport in deep and shallow, fractured and un-fractured porous media throughout the US DOE complex. FEHM has proved to be a valuable asset on a variety of projects of national interest including Environmental Remediation of the Nevada Test Site, the LANL Groundwater Protection Program, geologic CO2 sequestration, Enhanced Geothermal Energy (EGS) programs, Oil and Gas production, Nuclear Waste Isolation, and Arctic Permafrost. Subsurface physics has ranged from single fluid/single phase fluid flow when simulating basin scale groundwater aquifers to complex multifluid/ multi-phase fluid flow that includes phase change with boiling and condensing in applications such as unsaturated zone surrounding nuclear waste storage facility or leakage of CO2/brine through faults or wellbores. The numerical method used in FEHM is the control volume method (CV) for fluid flow and heat transfer equations which allows FEHM to exactly enforce energy/mass conservation; while an option is available to use the finite element (FE) method for displacement equations to obtain more accurate stress calculations. In addition to these standard methods, an option to use FE for flow is available, as well as a simple Finite Difference scheme.

License

FEHM is distributed as as open-source software under a BSD 3-Clause License. See Copyright License

Developers

External Collaborators must sign a Contribution Agreement. Contribution Agreement for External Collaborators

The following are reminders for FEHM code developers using this repository.

A Git workflow follows these basic steps:

  • Make changes to files
  • Add the files (‘stage’ files)
  • ‘Commit’ the staged files
  • Push the commit (containing all modified files) to the central repo
  1. To first get the repo, run the command
git clone https://github.com/lanl/FEHM.git

This will download the FEHM Git repo to your current directory.

  1. Let’s say you’ve done some editing and you’re ready to push your changes to the FEHM repository. Run the command
git add file1 file2 ... fileN

to add any files you have changed. You can also just run git add . if you want to add every changed file.

  1. Now, run
git status

This gives an overview of all tracked and untracked files. A tracked file is one that Git considers as part of the repo. Untracked files are everything else – think of *.o files, or some test data output generated by an FEHM run.

Tracked files can be:

  • Unmodified (you haven’t made any changes to it, relative to the last commit)
  • Modified (you have edited the file since the last commit)
  • Staged (the file has been added and is ready to be committed and then pushed)

Untracked files become tracked by using

git add filename
  1. After verifying (with git status) that all the files you want to be pushed are properly staged, commit them using
git commit -m "My first Git commit!"

Then, push the files onto the GitHub repo with

git push origin master
  1. If someone else has made edits, you will need to pull their changes to your local FEHM clone before you can push.
git pull origin master
git push origin master

BUILD FEHM

Build FEHM. See src and Makefile in that directory.

TEST FEHM

The full FEHM Test Suite documentation: https://www.lanl.gov/orgs/ees/fehm/docs/FEHM_VERIFICATION_V3.3.0.pdf

The full FEHM Test Suite can be downloaded from Assets under Releases. https://github.com/lanl/FEHM/releases

  • VERIFICATION_V3.3.0lnx.tar.gz
  • VERIFICATION_V3.3.0mac.tar.gz
  • VERIFICATION_V3.3.0win.zip

We also started a smaller set of tests driven by python scripts. fehmpytests are python scripts and are included in this FEHM repository: https://github.com/lanl/FEHM/tree/master/fehmpytests

See fehmpytests documentation: https://fehm.lanl.gov/Fehmpytests/html/index.html

PYFEHM

PYFEHM is a set of classes and methods to enable use of FEHM and auxiliary tasks within the Python scripting environment.

PYFEHM scripts on GitHub: https://github.com/lanl/PyFEHM

Documentation: https://lanl.github.io/PyFEHM/

FEHM Release Versions

See Versions and Notes under the Releases tab this repository.

The Most recent distributed release is FEHM V3.4.0 (September 2019) which is the version cloned for this repository. The FEHM software is a continuation of QA work performed for the Yucca Mountain Project (YMP) under Software Configuration Control Request (SCCR) (Software Tracking Numbers STN: 10086-2.21-00 August 2003, V2.22, STN 10086-2.22-01, V2.23, STN 10086-2.23-00, V2.24-01, STN 10086-2.24-01, and V2.25, STN 10086-2.25-00). The QA for these codes started under YMP QA and continue under under LANL EES-16 Software QA Policy and Proceedures as outlined in: "EES-16-13-003.SoftwareProcedure.pdf"

Before distribution of FEHM software, tests are executed and verified as acceptable on LANL computers with operating systems Linux, Mac OSX, and WINDOWS. The overall validation effort for the FEHM software consists of a suite of directories and scripts that test the model whenever possible, against known analytical solutions of the same problem. The test suite was developed under YMP QA for FEHM RD.10086-RD-2.21-00 and is available for download.

fehm's People

Contributors

daniellivingston avatar dharp avatar ehinrichs avatar millerta avatar rajeshjpawar avatar satkarra avatar shane-mckinney avatar spchu avatar viswana71 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fehm's Issues

Default boundary conditions

Hi,

I couldn't find the content about the default transport boundary conditions in the manual.

For example, in section 2.9 of "FEHM_VERIFICATION", Test of Barometric Pumping Mechanisms,the model did not set the transport boundary of the surface. Is it set to zero solute-flux boundary by default?

What is the default processing method for FEHM if I do not set any boundary conditions for transport.

Looking forward to your reply.
Thank you!

Build travis style build and test

Build travis style auto-test from selected set of tests that run quickly and are relevant.
Perhaps use pyfehmtests for this process.
See old install and test from YMP and see if they can be used.

FEHMPYTEST log file not working with multiple failures

Tested against a version of FEHM that passed 14/17 tests. However, not all of the failure messages got written in the log file. In my case three cases failed (dissolution, doe, and dryout) and only the error message from dryout was written. However, all of the errors were written to screen, so probably just a small bug.

Documentation Clarification for ngas

Submitted to Trac Tickets by Phil Stauffer 10/30/2012

PCO2(1) = 666 then the code uses the temp and pressure of a restart file to calculate the initial partial pressure of noncondensible gas as PCO2 = Ptotal - Pwater vapor, where Pwater vapor is a function of temperature assuming 100% humidity.

Learning FEHM

Hy, I'm Simona and I want to learn FEHM, may someone of you help me?

running a FEHM test

Hello
I have compiled FEHM under windows 10 and Intel Fortran.
I have created a dll and main program, which is basically mainrip_intel_dll.f (I guess its for intel compiler, having built the code as a dll).

the problem is that I do not see how to feed the data to the program
for example if I want to run the 1D_convection test case
I see three files in the input directory
1D_Convection.dat
1D_Convection.files
1D_Convection.grid

I guess that the file that needs to be fed is 1D_convection.files
can I hardcode the name of this file so I can run the code using the debugger ?
if yes where should I put it.
What I see is that only the msim file (if it exists) is read in a way that is traceable.

thanks for your help

best
jac

CO2 injection example

Hello
I am starting to test FEHM for the purpose of estimating CO2 storage capacities.
Is there any example/test that I could use as a starting point ?
thanks
jac

Issues with FEHM V3.3.2

  1. The option to interpolate boundary conditions linearly in time in the boun macro of FEHM using the ti_linear keyword no longer works. Instead of linearly interpolating linearly, the list of changes is approximated as a series of step functions. This is in the progress of being fixed by George.
  2. Peter Johnson’s new development has not be incorporated, George is working on merging his latest salt development with Peter’s development.

fehmpytest for dispersion

Xiang has developed a good test for dispersion.
It requires a an analytic evaluation for correctness which fehmpytest is not currently setup for.
Xiang will provide the files, the python script that checks results, and documentation.

FehmPyTests Fail

The fehmpytests, boun (incorrect hydrolic head at time 2.0), cellbased (global name not defined), colloid_filtration (missing valid comparison file), and ppor_read (no file), fail when running fehmpytest.py. They were commented out in the test suite, but making an issue for documentation.

Binary read

FEHM can currently read in unstructured binary .stor files, but cannot read any binary mesh.fehm files

Reading ASCII meshes with more than 10m nodes can take an hour or more, so FEHM should consider reading in all large files in a structured binary format.

Cyclic boundary condition not working for restart when intial time ne 0

submitted 11/09/2010 into trac ticket system

Phil found when trying to add a cyclic boundary condition to his restart that it crashed if he defined his cycle time relative to time 0, i.e., times were entered as 0 30, 60, etc. If he defined his cycle to start at the restart time 17800, with 30 day increments, the boundary did not re-cycle every 30 days as desired. My guess is that the first cycle time became too big because the start time was a large number of days. See Phil for more info.

Error at Generating nop.temp due to very large number of connections to a node

This issue should be documented and a Warning statement added to the code if a
node has an unusually large number of connections. The problem might be fixed
by making allocation adjustments in the sparse matrix initialization.

Problem reported by John Ortiz, Dylan Harp, and Carl Gable:

My simple model was getting hung up on the “Generating nop.temp” step before exiting altogether and printing a generic message to the effect of “nop.temp file does not match”.
 After digging around, Dylan and I found that there was a node in our mesh with ~2500 connections to it. After reducing that number to 90, the issue was resolved.

Embeded wellbore model

Hello
I would like to test the EWM capability of FEHM
Is there any example I could start from ?
thanks
jac

EXM coupled flow and stress

Track Ticket submitted for Sharad 06/05/2012

New code changes for EXM cause verification test suite to break in following test:

HEAT_GDKM_2D: output format change may cause problems with the script

Compiling on Apple Silicon (arm64)

Under an M2 Mac with gfortran 13.2.0, make install returns this error:

src % make install
rm -f ./dated.f
rm -f ./dated.o
sed s/OS\ DATE/macOS\ 24-04-11/ ./dated.template > ./dated.f
gfortran -frecord-marker=4 -no-pie -march=native -O2 dated.f -c -o ./dated.o
gfortran -frecord-marker=4 -no-pie -march=native -O2 enrich_ctr.f -c -o ./enrich_ctr.o
enrich_ctr.f:150:34:

150 | call add_resolution(1,ie,itype,nlayers,nei_add,node_add)
| 1
Error: Rank mismatch in argument 'imtype' at (1) (scalar and rank-1)
make: *** [enrich_ctr.o] Error 1

Issues Fixed V3.1

Issues added by bulk in conversion from Mercurial to github

These are fixed Issues edited from Release_notes_V3.1.0.txt
(Removed changesets not related to code fixes)

Version 3.1.0 Jan 29 2008 to Aug 20 2012

@465:8b356280cfe7 3 weeks spchu
rename params_eosco2 to params_eosco2.h to be used by co2_fugacity.f

@464:e9d99e2042a8 3 weeks spchu
rename params_eosco2 to params_eosco2.h to be used by co2_fugacity.f

08/16/12

@463:f90e801271bc 4 weeks spchu
Added fix to set ifxconc correctly when using pH.

@462:79484e04dce0 4 weeks spchu
remove params_eosco2.h, renamed it to be params_eosco2 which is not an object file needed to be included in the depends file

08/09/12

Matthew Schauer enhancements to combine trac and rxn to macro trxn.
This commit incorporates a number of major updates and revisions to the trxn
macro. The macro is now current with the documentation on the manual wiki at

06/07/12

@442:09c58b87244b 3 months kelkar
stressctr.f
debuged the input of flag_element_perm on the same line as the macro 'fem'

08/14/12 change version tag to 3.1.1

%%%%%%% VERS3.1.0_012_0418 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
In order to better synch version numbers embedded in the code and documentation
Change this version to 3.1.0 instead of 3.00 and continue on with versions 3.1.*

@407:ea3d18147a29 5 months zvd
Added output of node number along with number of connections. Code now reports itis stopping once the connections list is written.

03/27/12

@406:357f079c5f5b 6 months zvd
Fix improper assignment of function return value for the cden correction.

@399:c7d066d87687 6 months zvd
Coding was added to compute concntration flux for vapor species. A correction was made to use the correct index for density, volume, saturation and porosity.

@398:f52723379110 6 months zvd
Fixed output order problem (unformatted output) for particle numbers by species for mptr simulations. Modified code to only output information for the number of particles for a given species. Previously output was controlled by number of particles that species 1 had.

03/29/12

@396:405f3078f079 6 months zvd
Corrected header for sptr btc output when keywords 'alt' and 'xyz' are used.

%%%%%%% VERS3.0_012_0418 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

02/02/12 Release V3.1.0 Distribution for Linux and Mac, Zora compile

01/25/12

@383:3a92ca4a69b7 8 months zvd
Fixed argumnet mismatch in subroutine calls from these routines.

@382:16f30f45fcff 8 months zvd
Removed duplicate specification for use of variable ipermstr2 from module comsi.

12/20/11

@378:007efc7a9355 9 months zvd
Modifications to keep in sync with EM version of FEHM and correct minor issues.

11/29/11

@376:32308f3a8a76 10 months zvd
Fixed variable assignment for CO2 gas density and viscosity output. Added time option
where hours can be fully spelled out instead of abbreviated.

@375:f2c1d491a8a1 10 months zvd
Fixed output flag to only output enthalp fluxes when available in simulation.

@373:2f4406f401f8 10 months zvd
Corrected derivative sign for CO2 liquid variable in relative perm calculation.

@372:9ef263594766 10 months zvd
Corrected allocation of local variable to match size of global equivalent. Mismatch in size
caused crash on deallocation.

11/08/11

@343:ba11f03c899d 10 months zvd
Added back in co2 flow option inadvertently ommited during merge due to duplicate use of a flag ID.

@342:153f2c936819 10 months zvd
Corrected problem with zone definitions for dpdp problems, where auto-generated zones overwrote user defined zones for the matrix. Do not want to auto-generate the matrix node zones if the user has created their own zone definitions.

%%%%%%% VERS3.00 Nov 2011 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10/31/11 TAG V3.1 with docs V3.0

@334:02c2b58b566f 11 months zvd
Add correct (and correctly named version) of gdkm_connect for new generalized double porosity / double permeability model.

@329:06c630827fd1 11 months zvd
Correct second index for particle concntration calculation.

@328:36aaf420510a 11 months zvd
Add coding to output multiple species for mptr problems. Original version only output data for species 1 in a multiple species particle tracking simulation.

09/06/11

@318:677914dbd67b 12 months zvd
Added logic to set default control file, error file, and check for command line only if this is not a GOLDSIM linked run with input parameter in(4) = 666.

@317:6851cfaf2c16 12 months zvd
Modify part_track output to include cumulative time when outputting particle location (pout = -7) and correct header to reflect the values output to file for that option.

@315:8c7532e1126e 12 months zvd
Fix scanning routine so code is reading correct unit if the rlpm macro is entered in an optional file. Add check to scanning of particle restart data to determine if zbtc data was written so particle count is calculated correctly.

07/18/11

@310:35626defa85f 14 months zvd
Correct input unit number so rlpm macro can be correctly read/scanned from an external file.

06/23/11

@308:fcf58778ce0f 15 months zvd
Modified conditional checks to allow capillary pressure output when ico2 > 0 or irdof ne 0 or ifree ne 0. Was not outputting capillary pressure for isothermal air/water problem.

05/17/11

@296:6096cf50b73d 16 months rajesh
Changed model for calculation of fugacity in co2_properties module. Went back to the
earlier formulation based on Span and Wagner.
Added a new subroutine 'co2_fugacity.f'. Made appropriate changes
for calling co2_properties in other subroutines.
Changed the order of call for icectrco2 and ther_co2_h2o in bnswer, varchk and startup
This was done because the fugacity formulation requires density which is calculated
with ther_co2_h2o with flag 0.
Changed the formulation for calculating heat outflow bc in ther_co2_h2o.
Modified output of zone fluxes.

04/19/11

@288:d0b23d00790f 17 months zvd
Fixed cast of type where real value was used in calculation of an index for the in array.

@287:66748f5a4aed 17 months zvd
Made some corrections to allocation (only allocate if unallocated) and assignment of "in" array (only check wtrise if linked to GoldSim?). Changes were needed with respect to adding "in" to comuserc.

@286:a82bc5f39580 17 months zvd
Made call sequence consistent with subroutine for call to max_excess_shear.

02/07/11

@270:c61cb1fc89e9 20 months sai
Added routines for stress computations in 2-D using 'fem'
Fixed a minor bug in the bodyforce computations

01/19/11

@264:2910c24a437b 20 months zvd
Add coding that changes check for number of nodes found in restart file compared to nodes in code because for a gdpm problem additional nodes do not have to be in increments of neq_primary like for dpdp or dual problems.

@262:3da2f4ae9cbe 20 months zvd
Corrected assignment of end-point values for linear rlp and capillary pressure models.

@260:5e139ecc1183 20 months zvd
Changes to fix problems with sptr. In insptr insure dtmin is set to positive value, and freeze_time is correctly initialized. In ptrac3 add warning for illegal particle moves and check to make sure that for sptr2 for plumecalc output only occurs when a particle leaves a cell. For move particle remove old coding for random walk jumps in regular grids that erroneously exited loop at edge nodes. Add bilinear interpolation routine for type curve interpolation.

12/21/10

@256:931efcd15b69 21 months zvd
Per gaz finding, moved assignment of alpha and beta before conditional for rlp or capillary calculation. Previously they were undefined on return call to routine for calculation of capillary pressure (model 19).

@255:a55823a3ce56 21 months zvd
Added coding from Lagrit parse_string routine to correct problem where the parser was identifying a string made up of integers and "-" as an integer instead of a string.

@250:e6d7421d20f4 21 months gaz
added capability to manage far-field boundary conditions (comai,combi,data,scanin,
input,gensco2h2o.f)
fixed errors in vgcap and rlperm_co2

@230:763bcf14d21c 22 months zvd
Corrected accumulation terms for solute diffusion. For solute diffusing into or out of a cell a positive change in the cell concentration should be added to the sumin and a negative subtracted from the sumout.

11/01/10

ther_co2_h2o.f small corrections for Co2 energy term (and production term)

@244:f9af6e74318b 2 years gaz
corrected bug in shape function routine
changed the definition of volumes generated in gncf3 to match that needed for body
forces
added test routine in user_ymp.f

@242:0760302730bd 2 years gaz
Corrected co2 production terms

@241:956a0f8937b5 2 years gaz
fixed errors

@240:430cd04846e2 2 years gaz
fixed bugs in CO2 code
(geneq_co2.f,geneq_h2o_co2.f,gensco2h2o.f,ther_co2_h2o.f,etc
fixed a minor bug in vgrlps.f
fixed minor bug in steady.f

10/12/10

@228:f7a9b83f39be 2 years zvd
Fixed co2 code to correct enthalpy terms for water and co2 fluxes. Fixed upper limit check for saturation in vgrlps.

@227:d63d8d72c24d 2 years zvd
Add check to ensure that the water saturation used to compute diffusion is between 0. to 1.0 so diffusion is computed correctly. Saturations lieing outside that range can lead to NaN's being computed and bad results.

06/24/10

@216:4138aed9d7b1 2 years zvd
Resolve inconsistencies found on merge of open code with ExxonMobil? base code.

@212:901945ec7f50 2 years gaz
made changes to stress calc routine
added more sterss coefficients (stress averaging)
added changes for tensor perm and heat and mass flow
added partial fix for spatially variable GDKM
minor fix for peaceman well

@204:19fd1184147f 2 years zvd
Corrected indexing problem with particle output when particle restarts are used for the minimal (plumecalc style) sptr2 output. Also, added option to only output final particle location when particle time is greater than simulation time if an output end flag is set.

@203:73e4bd7e4863 2 years zvd
Corrected type decalrations for ncon and nop to integer in the routine to match the variables being passed in.

@201:25f08da112b6 2 years zvd
Corrected trac output for Henry's Law species. For history output, the concentration values output were correct for the model component, but the headers were wrong for vapor species - reporting output as aqueous instead of vapor. For contour output, the aqueous values were always output instead of the vapor concnetrations when a vapor species was used.

03/04/10

@210:d8ac62b7e519 3 years gaz
Fixed minor out of bounds

@209:c3913611527b 3 years gaz
add_gdpm.f : added new model and minir changes
area_flow_bc.f : added calculation of control volume lengths in all directions
bnswer.f : changed call to outbnd
comai.f : added global variables
resetv.f : minor bug fix
gradctr.f : additional capability

@196:d65de61536c1 3 years zvd
Corrected incorrect input unit designator in reads for 'well' macro, so data can be correctly read from an alternate input file.

@195:3b1a11d08006 3 years zvd
Fixed terminal and output file headers for flux output to match new format of zone flux output.

@194:c5d98ca2644c 3 years zvd
Fixed indexing variable so zone idnetifiers are written correctly to output title string.

@193:0f42bf2d586f 3 years zvd
Fixed default conditions for macro flxz so that vapor output is not enabled for wtsi problems.

@189:f17bcc17d5e8 3 years zvd
Corrected incorrect goto location when rxn macro and zone output are used.

@188:e50237e91734 3 years zvd
Fixed time reporting problem when using transient particle release with initial simulation time greater than particle release time. Particle movement is now related to initial simulation time, if greater than particle release time.

@187:7b2df28fe5e5 3 years zvd
Add correction for calls to solve_new and solve_dual when igauss = 1.

@185:ce2bfb5e1f89 3 years zvd
Fixed problem with coordinate output in vector file when 2D geometry is not in terms of XY but XZ or YZ.

@181:b3fce545cb9c 3 years gaz
Resolved small (rlp= -4) in rlperm.f
inpyt and scanin have only small changes.

@178:d30fa951c93d 3 years zvd
Modified 0. arguments to max function, wouldn't compile on intel MAC using absoft compiler due to type mismatch.

@173:952cd9c4bb7f 3 years zvd
Fixed index for output in diagnostics and gensdp_switch. Checked for open output file in infiles before write. Added allocatio for unallocated stress parameters.

@168:8a905759b5ab 3 years 090334
minor changed to data checkin

10/20/09

@166:7b0ba975a79c 3 years gaz
airctr.f changes to control phase changes (could be important)
comai.f added parameters
data.f set default values for some ne phase change control parameters
input.f added new input macro ittm for pase change sticking time
stress_perm.f minor corrections
structured.f added routine to generate an element file (not tested!)
user_ymp.f added case 455 (covert NER data to permeabilities)
write_avs_node_con.f,write_avs_node_mat.f,write_avs_node_s.f - read,write elem(for fdm) to graphics file.

@165:fdf5952c2f68 3 years zvd
Made changes to rdcon to check for 0 or negative porosities when distributing input moles in a zone. Fixed incorrect goto label for zone output for transport with reactions in write_avs_node_con. Added better conditional check for air/vapor flux output to ensure phase is present and variables have been defined in input and flxz.

@164:4c8a9148607d 3 years zvd
Commit changes from merge and add modifications to output head values in history and countour files when using chead macro, and add vapor zone flux output and keywords to select zone flux phase for liquid-air/vapor problems.

@163:f0c8b606e975 3 years zvd
Correctly set vboun flag and modify to allow 0 volume input.

@162:7b52ff7b1b6d 3 years zvd
Remove extraneous commas from write statements in compute_exit_new and steady. Add back in density assignment to rolf in ther_co2_h2o that is needed for correct functioning of transport.

@161:58a7322b14d1 3 years zvd
Commit changes from merge, updated Makefile.depends for modified common file and new file added, fixed call to subroutine max in stress_perm so data types matched.

@159:17cd9ad6e50b 3 years gaz
correction for writing head output
added sticking parameter for phase changes

@155:4ffa96d8bab4 3 years zvd
Modified comsteady, steady to output steady state message for each output time. Fixed problem in write_avs_node_s that was causing double zone headers to be written when xyz output was invoked.

@150:c77f49df78bd 3 years gaz
airctr.f -insignificant cganges
bcon.f - added ifree.eq.0
comriv.f - added more well variables
comriv.f - added and passed through implicit well variables
geneq1.f - small change for river or well connections (only for iriver=2)
geneq2_wtsi.f - small change for river or well connections (only for iriver=2)
geneq_stress_uncoupled_2D.f - minor changes
geneq_stress_uncoupled_2D_FEM_rad.f - minor changes
geneq_stress_uncoupled_3D.f - minor changes
gensl2.f - insignificant changes
implicit_well2.f - cleaned up generation of well segments
plot_new.f - don't know
plot_new.f
rlperm_wtsi.f - commented out per iteraioin output
startup.f- don't know
stress_2D_post.f - minor
stressctr.f - minor
user_ymp.f - added case 455 permeabilty data conversion to fehm input
wtsictr.f - minor

@149:6b303a0dfd09 3 years zvd
Corrected initializations so multiple boun macros in an input deck would work correctly. For PC corrected inconsistencies between versions of the fehmn subroutine.

@147:b51ac15eb065 3 years zvd
Add additional output options for CO2 (mass fraction) and minor bug fixes in logic.

@146:3be075e24044 3 years zvd
Correct logic for output of relative displacements for history plots.

@144:ce08bedefe10 3 years zvd
Updates to history output for addition of CO2 pressure output and split of pressure output into multiple files.

@143:d1afc7e95636 3 years gaz
changes to improve efficiency for anisortropy calcs
merged keita's changes to stress perm

@142:f846be920e37 3 years zvd
Minor fixes that were not correct from last update: fehmn.f modified to match fehmn_pcx.f, missing conditional in stress_perm and type conversion fixes, and delete unnecessary variables from geneq_stress_uncoupled_2D.

@141:4649c1a16f56 3 years gaz
miscellaneous snall corrections and corretcions for running heat conduction with stress

@140:6b5e47c7d50a 3 years gaz
corrected files for anisotropy, wells, and minor changes to stress solution

@138:db1aea21180a 3 years zvd
Miscellaneous fixes: cntlio - fixed read of usub_num to be non formatted integer, comai & cntlio - implemented flag to suppress output of nodal equation residuals, storsx & storsx_write - fixed file checks and assignments, wellphysicsctr - added check to see if variable is already allocated, flxz, inhist & plot_new - fixed output headers, etc and variables for co2, split co2 saturations into two output files.

@137:5915093c3de5 3 years zvd
Fixes for stress with thermal only simulation. Use conditional idoff .eq. -1 for check.

@136:d211cc0d3323 3 years zvd
Fixes to routines for stress used with thermal only simulation. Corrected conditional checks from idof .le. 1 to idoff .eq. -1.

@131:45e9e733a21c 3 years zvd
Minor modifications to correct line length, position of continuation character, change to real variable where integer was used incorrectly used.

06/18/09

@122:d5650132fc95 3 years zvd
These modifications include changes to fehmn.f for FEHM V2.26 modifications and the sptr module updates. Also included are modifications to improve/correct the functionality of a free drainage condition (inflo3.f), new sub-model input and output functionality (input.f, submodel_bc.f), data updates (data.f, setparams.f), fixes/changes to output logic (flxz.f, cflxz.f, write_avs_node_con.f, wrtout.f) and any other associated changes to variables or logic.

@121:ffea1a9199e7 3 years zvd
These modifications incorporate changes to the sptr module including an alternate output format for breakthrough (added for FEHM V2.26) and updates to improve code performance and behavior when particles move into poorly connected regions of the grid created by addition of zero porosity nodes. Changes have also been made to sptr2 output to be used with PLUMECALC.

@120:14d4e4d22fd0 3 years zvd
These changes incorporate the functionality and fixes incorporated in YMP qualified version FEHM V2.26. It includes a variable permeabilty option in the boun macro and a solute recirculation with erosion model. Logic corrections were made in the GoldSim? coupled model for colloid filtration where the random number used was incorrectly set and the full colloid distribution was not sampled, and to correctly apply a change in water table elevation.

@96:2a1ebe2796c9 3 years gaz
committing files with minor cosmetic changes

@95:47f9587aae44 3 years gaz
added correct date stamp

@94:397af23187c4 3 years gaz
removed some unused code that was there for testing

@76:c6aa26cb636a 3 years zvd
Corrected problem caused by attempt to output undefined variable pcp.

03/30/09 Version 3.00

hist macro crashes when running from command line

Submitted as track ticket 8/14/2012 by Philt Stauffer

Problem found by Phil Stauffer while helping Bill Lowry. Initial mistake was an extra line between node section and hist section. Extra line was removed but....

When running from the command line, the attached input deck crashes on HIST. When running from the attached fehmn.files file, it runs fine.

Files included here and as attachments.

heat2dr8hist.in.txt
fehmn.files.txt

Packaging of `FEHM` with `nix`

Hey,

This is mostly just a FYI but I have gone through the effort of packaging fehm for the nix package manager (https://nixos.org/). See here for the build definition: https://github.com/nialov/nix-extra/blob/master/overlays/packages/fehm/default.nix

nix provides reproducible (and cached builds) of any software. This means it is possible to always reproduce a build with nix if you for instance provide a revision of the repo with the nix build declarations. E.g.

nix build github:nialov/nix-extra/d905dc7eca43321db38ee985ea8f10ae56de9b7c#fehm

Anyway, if you have had trouble with e.g. reproducibility and with developers setting up their development environment, nix is a solution to these problems although it has a steep learning curve. I have not included my packaging efforts in nixpkgs (https://github.com/NixOS/nixpkgs), as I do not know fehm well enough to say if the produced build result is completely valid. Let me know if any you actual maintainers have interest in these things! Otherwise, as said at the start, this is just a FYI.

DVA check

From code change notes Sep 2017
Macro DVA has a forced explicit update to fix possible derivative problems, needs further checking.

[Solved] problems compiling FEHM with intel visual fortran

Hello
I am trying to build FEHM with intel Visual fortran under windows.
I get a large number of errors of the same type around this portion of code

c add coding to save upwind position
if(iad.le.iad_up) then
fid=0.5
axyd=t8(neighc)
if(axyd.lt.0.0) fid=dnwgt
if(axyd.gt.0.0) fid=upwgt
t9(neighc)=fid
c
call setbit(nbits,neighc,upwind_l(iz4m1),fid)
c
else
if(bit(nbits,neighc,upwind_l(iz4m1))) then
t9(neighc)=1.0
else
t9(neighc)=0.0
endif
endif
the error arises because subroutine setbit accepts integers only but the array upwind_l if real.
I saw that in some routines any reference to setbit was commented
Is it ok to do so ?
thanks
jac

Tec to VTK error

Originally an email from P. Johnson:

This happened with tecplot outputs from FEHM (pulled from github late november 2021), the tec_to_vtk.jl in its tools, and most up to date Julia. I've had version issues before with Julia and this script, so there may be some change that's borked the convert to DataFrame. Either way, it might be worth some tests with newest Julia version in case the stuff on github isn't functional
image
.

Makefile bugs

Debug option compiles .o's in -O2 mode

It would be preferable to be able to compile into a build/ dir

Code Fixes before year 2010

These are included here as a group for completeness.
These issues are tickets and commit changes before 2009 and includes work for Version 3.0

george zyvoloski emails May 2017 regarding V2.24 not reporting neg ccoefs.
We made a change in the stor file calculation when we got to FEHM V3. Starting with FEHM V3, the default stor file calculation
was with finite volume calculations (so-called finv).
In FEHM V2 the default calculations were finite element type with node point (Lobatto) integration.
This produces a stor file that is close to a finite volume calculation, especially for nearly orthogonal grids.
With the corrected FEHM V2.24, results identical to FEHM V3 were produced- noting that the finv keyword had to be added.

gaz
miscellaneous small corrections and corretcions for running heat conduction with stress
corrected files for anisotropy, wells, and minor changes to stress solution

zvd
Miscellaneous fixes: cntlio
Minor fixes that were not correct from last update: fehmn.f modified to match fehmn_pcx.f, missing conditional in
stress_perm and type conversion fixes, and delete unnecessary variables from geneq_stress_uncoupled_2D.
fixed read of usub_num to be non formatted integer, comai & cntlio
implemented flag to suppress output of nodal equation residuals, storsx & storsx_write
fixed file checks and assignments, wellphysicsctr
added check to see if variable is already allocated, flxz, inhist & plot_new
fixed output headers, etc and variables for co2, split co2 saturations into two output files.
Fixes for stress with thermal only simulation. Use conditional idoff .eq. -1 for check.
Fixes to routines for stress used with thermal only simulation. Corrected conditional checks from idof .le. 1 to idoff .eq. -1.

zvd
These modifications include changes to fehmn.f for FEHM V2.26 modifications and the sptr module updates.
Also included are modifications to improve/correct the functionality of a free drainage condition (inflo3.f),
new sub-model input and output functionality (input.f, submodel_bc.f), data updates (data.f, setparams.f),
fixes/changes to output logic (flxz.f, cflxz.f, write_avs_node_con.f, wrtout.f) and any other associated changes to variables or logic.

These modifications incorporate changes to the sptr module including an alternate output format for breakthrough (added for FEHM V2.26)
and updates to improve code performance and behavior when particles move into poorly connected regions of the grid created by
addition of zero porosity nodes. Changes have also been made to sptr2 output to be used with PLUMECALC.

These changes incorporate the functionality and fixes incorporated in YMP qualified version FEHM V2.26.
It includes a variable permeabilty option in the boun macro and a solute recirculation with erosion model.
Logic corrections were made in the GoldSim? coupled model for colloid filtration where the random number used was
incorrectly set and the full colloid distribution was not sampled, and to correctly apply a change in water table elevation.

zvd
Corrected incorrect input unit designator in reads for 'well' macro, so data can be correctly read from an alternate input file.
Fixed terminal and output file headers for flux output to match new format of zone flux output.
Fixed indexing variable so zone idnetifiers are written correctly to output title string.
Fixed default conditions for macro flxz so that vapor output is not enabled for wtsi problems.
Added an option to exclude input particle locations that fall outside the problem doamin instead of moving the particle to a position within the domain.
Replaced extraneous comma in header for zone flux output using CSV format.
Eliminate extraneous "+" in distance calculation and assignment.
Corrected incorrect goto location when rxn macro and zone output are used.
Fixed time reporting problem when using transient particle release with initial simulation time greater than particle release time. Particle movement is now related to initial simulation time, if greater than particle release time.
Add correction for calls to solve_new and solve_dual when igauss = 1.
Added keyword option to generate a single-phase flow macro (i.e. output 0. or 1.0 for saturation).
Fixed problem with coordinate output in vector file when 2D geometry is not in terms of XY but XZ or YZ.

zvd
Major revision/update of fehm-open for Version 3.00
Added and changed routines to implement stress.
Changes made to the stress-related subroutines to fix array addressing problems,
simplify input, and allow for different conceptual models of aperture-displacement-stress relationships to be implemented.
Split storsx into 3 parts to simplify modification.
Added additional well bore gridding options.
Added options to allow reading of different element conventions.
Added a framework for specifying different wellbore physics.
Added option for output of initial pressures and temperatures for stress calculations.
Modified submodel_bc to output boundary fluxes for keyword 'flux'.
Added keyword 'all' to zone input to allow every node in grid to be put into a zone without having to specify coordinates.

zvd
Corrected inconsistency in number of parameters checked for rlp model 19.
Miscellaneous fixes: cntlio - fixed read of usub_num to be non formatted integer, comai & cntlio
implemented flag to suppress output of nodal equation residuals, storsx & storsx_write
fixed file checks and assignments, wellphysicsctr
added check to see if variable is already allocated, flxz, inhist & plot_new
fixed output headers, etc and variables for co2, split co2 saturations into two output files.

zvd
Added and changed routines to implement stress.
Changes made to the stress-related subroutines to fix array addressing problems, simplify input, and allow for different conceptual models of aperture-displacement-stress relationships to be implemented.
Split storsx into 3 parts to simplify modification.
Added additional well bore gridding options.
Added options to allow reading of different element conventions.
Added a framework for specifying different wellbore physics.
Added option for output of initial pressures and temperatures for stress calculations.
MOdified submodel_bc to output boundary fluxes for keyword 'flux'.
Added keyword 'all' to zone input to allow every node in grid to be put into a zone without having to specify coordinates.

zvd
Corrected inconsistency in number of parameters checked for rlp model 19.

viswana
Changed the appropriate tracer and co2 flow routines so that tracers work with co2 problems.
chemod.f: made it so that the dissolved co2 concentration from the flow code controls the amount of co2 in the water
coneq1.f, icetrco2.f, ther_co2_h2o.f: variables that have changed in the co2 code that are needed by the trac macro we
re accounted for.

rajesh
Changed drivatives in co2_properties for maximum dissolved CO2 saturation.
Changed the way enthalpy is calculated for water(brine) with dissolved
CO2 and associated derivatives in geneq_co2, gener_h2o_co2 and ther_co2_h2o.
Changed the way phase change is done for CO2, for dissolved CO2 case.

zvd
Fixed logic for creation of geometry files and added time unit output option for tecplot.
Fixed anonp to use neq_primary for wellbore/river problems.
Correct problem with global variable headers and index problem for trac vapor species when multiple species are used.
Corrected contour output for 2D problems to correctly output specified coordinates. Also fixed problem with tecplot headers for vector output.

Version 2.24 Mistake in stor file creation
Comments from George Zyvoloski May 11 2017.
I did find a mistake in the stor file creation in V2.24.
In FEHM V2 the default calculations were finite element type with node point (Lobatto) integration.
This produces a stor file that is close to a finite volume calculation, especially for nearly orthogonal grids.
Even so, I found there was an error (circa 2000) in the calculation of the orthogonal volume of the elements
in FEHM V2 for the element order for grid (we now correct for negative volumes).
In any case, this caused FEHM V2.24 to label all the elements in Sharad's sloping grid as orthogonal.
While there should have been extra connections caused by the sloping grid, none were produced because FEHM V2.24
thought it had an orthogonal grid.

Version 2.3.0 (January 2008)
No issues or ticket system
This was the last version working under Yucca Mountain Project (YMP) Software Configuration Control.
Verification and Validation (V&V) Test Suites were established using YMP QA for FEHM RD.10086-RD-2.21-00.
The QA for these codes continue under SFT QA practices using mercurial/trac for version control and record keeping.

Move code from PVCS Version Control to Mercurial (hg) with trac Ticket system (January 2008)

FEHM FIRST TIME USE

HI,
I am using FEHM for the first time. Please can someone guide me through? i need to use it for Heat Conduction test

Solid species in trac not working without rxn

Submitted as trac ticket 10/15/13 by Amy Jordan

During debugging, we found that using trac with a solid species without rxn does not work. In the debugger, error is:

At line 676 of file ../src/cnswer.f Fortran runtime error: Array reference out of bounds for array 'drdcimm', upper bound of dimension 1 exceeded (1 > 0)

Change Copyright to new 2018 version - ALL Files

Replace Text:

! Copyright, 1993, 2004, The Regents of the University of California.
! This program was prepared by the Regents of the University of
! California at Los Alamos National Laboratory (the University) under
! contract No. W-7405-ENG-36 with the U.S. Department of Energy (DOE).
! All rights in the program are reserved by the DOE and the University.
! Permission is granted to the public to copy and use this software
! without charge, provided that this Notice and any statement of
! authorship are reproduced on all copies. Neither the U.S. Government
! nor the University makes any warranty, express or implied, or
! assumes any liability or responsibility for the use of this software.

With new Text:

! FEHM V3 LA-CC-2012-083
! Copyright 2018. Los Alamos National Security, LLC. This software was produced under U.S.
! Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is
! operated by Los Alamos National Security, LLC for the U.S. Department of Energy. The U.S.
! Government has rights to use, reproduce, and distribute this software. NEITHER THE GOVERNMENT
! NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR
! ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to produce
! derivative works, such modified software should be clearly marked, so as not to confuse it with the
! version available from LANL.

WINDOWS to LINUX compile issues

When compiling code written on Windows, these are some common problems.
GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0

Line length too long. FIX: split the line and use continuation character.

thermw.f:951:65:
  951 |        call fluid_props_control(0, 0, 0, fluid(1), 'all           ', '                     ')
      |                                                                 1
Error: Unterminated character constant beginning at (1)

Logicals comparison error. FIX with eqv replacing eq

co2ctr.f has many errors, many from lines too long, FIX with continuation.
 1344 |      &     phase_nr(2).eq..false. .and.phase_nr(3).eq..false.) then
      |                                       1
Error: Logicals at (1) must be compared with .eqv. instead of .eq.

Windows close argument not supported. FIX by removing dispose argument ie. close(lu)

avs_io.f:498:28:
  498 |                    close(lu,dispose = 'delete')

new module not recognized. FIX by adding to Makefile.depends

varchk_simple_awh.f:17:9:
   17 |       use commass_AWH
      |         1
Fatal Error: Cannot open module file ‘commass_awh.mod’ for reading at (1): No such file or directory
compilation terminated.

Makefile.depends example for modules:
Add modulename.o to files that contain the mod name
Add modulename.mod: filename.o

varchk_simple_awk.o: commass_AWH.o
commass_AWH.mod: commass_AWH.o

Create repo for full Test Suite

Create FEHM-VV on github which will include the full test suite, source code for scripts, and documentation.
This will take a little work to make the files repo friendly.

Inaccuracies in vector files written for contouring

From discussions with SoilVision and Phil Stauffer

The vector files written for contouring are the control volume interface volumetric flux values mapped back on to the mesh nodes. The algorithm for this mapping will have errors most visible for non-orthogonal meshes.

Issue with tec_to_vtk.jl

Hi I am trying to use the script for converting tecplot files to vtk for visualization in paraview.
I am experiences several issues. I have to say this is the second time I use julia, so I am not an expert about it.

The main bug is this line: elems = Array(MeshCell,numelems).
The error is: MethodError: no method matching Array(::Type{MeshCell}, ::Int64).
I guess this means that I can't create as it is, with Array, a vector populated with MeshCell for a number equal to numelems.

Any idea on how to solve this or an updated version of this code?

Thanks,
Carla

tec_to_vtk.jl with latest Julia release

Greetings,

The tec_to_vtk.jl support tool seems to work for Julia 1.5, but not in the most recent versions. It looks like something has changed with conversion to dataframes.

image

Cheers
Peter

fehmpytests for rad_decay

Not in VV Test Suite, it does not use files in /compare as reference.
Instead the results are compared against equation values in bateman.py

Also, though fehmpytests is reporting this test result as OK, it has mismatch failures on the iodine result.
I tried old and new fehm executables and the result is the same for all.
The result will need to be checked and fixed if needed.

Modified fehmpytests.py to report Errors and failures during rad_decay

        # tam add output if success
        CI_fail = 0
        CX_fail = 0
        CC_fail = 0
        for t,f,b in np.column_stack([CI_fehm, CI_b]):
            if b > 1e-6:
                self.assertTrue(abs(f-b)/f<0.1, "Concentration mismatch for Iodine at time %g, FEHM: %g, Bateman: %f"%(t,f,b))
                CI_fail += 1

        for t,f,b in np.column_stack([CXe_fehm, CXe_b]):
            if b > 1e-6:
                self.assertTrue(abs(f-b)/f<0.1, "Concentration mismatch for Xenon at time %g, FEHM: %g, Bateman: %f"%(t,f,b))
                CX_fail += 1

        for t,f,b in np.column_stack([CCs_fehm, CCs_b]):
            if b > 1e-6:
                self.assertTrue(abs(f-b)/f<0.1, "Concentration mismatch for Cesium at time %g, FEHM: %g, Bateman: %f"%(t,f,b))
                CC_fail += 1

        if CI_fail == 0 and CX_fail == 0 and CC_fail == 0:
            print('\nSuccessful evaluation of rad_decay.')

        elif CI_fail > 0:
            print('\nFailures evaluating rad_decay run_135iodine.dat',CI_fail)
        elif CX_fail > 0:
            print('\nFailures evaluating rad_decay run_135xenon.dat',CX_fail)
        elif CC_fail > 0:
            print('\nFailures evaluating rad_decay run_135cesium.dat',CC_fail)

GDKM macro bug

Trac Ticket submitted by Amy Jordan 06/05/2012

nelm() variable is out of bound in routine area_length_calc.f when do gdpm test suite, which causes segmentation fault.

We need to ask George to take a look at this. I was able to avoid the segmentation fault by setting the loop in line 298 back to i=1 to neq_primary for gdpm as well as gdkm problems, like it was before, and it runs fine, but this may not be the correct fix.

On line 298 of the new area_length_calc.f, before, the loop always ran from i=1 to neq_primary, where neq_primary = 51 for the fracture transport gdpm test problem. Now, the loop runs to i=neq_primary if gdkm is enabled (so it works fine for gdkm), but the loop runs to n = 1530 (for the test problem), i.e. primary nodes + gdpm nodes, when gdpm is enabled. In line 312: i1 = nelm(i)+1 But nelm is of size 203 for this test problem, so when i>203 the problem arises.

`bit` and `setbit` subroutines fail to compile in Intel Visual Fortran

Due to integer / real*8 type differences in the setbit subroutine parameters, Intel Visual Fortran may fail to compile.

In the event this happens, check out the flag "Check Routine Interfaces" in the "Diagnostics" option of the Fortran workspace properties.

You may also comment out bit and setbit and all references to them. This will, however, disable the uncommonly used subroutine itup.

For more information, see #22 .

stack overflow issue

User Guoyan ([email protected]) encountered “stack overflow” problem when running a THM simulation using node count of 154395, same problem runs fine with node count of 52269. The simulation was carried out on a Windows 10 64-bit machine, with six installed memory sticks of DDR4 2933MHz 32GB, FEHM executable used is Version 3.4.0
Possible fix from George Zyvoloski: use trace back information, taking the array out of a subroutine call header and put the variable into a use module.

Segfault on Co2 with -ffpe-trap=underflow,overflow

I've found FEHM works on many different problems - but when ran on co2 a segfault is generated if compiled with -ffpe-trap=underflow,overflow

If compiled in debug mode with -ffpe-trap=underflow,overflow FEHM's b matrix is off by a factor of idof in some locations; thus outputting incorrect results

If you know exactly what -ffpe-trap=underflow,overflow if you have any valuable information on this flag please comment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.