PhreeqcUsers Discussion Forum

Registrations currently disabled due to excessive spam. Please email phreeqcusers at gmail.com to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • Installation questions »
  • Version problems
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Version problems  (Read 3405 times)

Yongqiang

  • Top Contributor
  • Posts: 123
Version problems
« on: 14/05/20 16:19 »
Dear Phreeqc experts,

When I compiled the phreeqc library with a flow simulator. It gave me errors from the compiler. Please see the attached figure for detailed information. Is it because I am using the latest version library while the code is based on an old version?

Regards
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4074
Re: Version problems
« Reply #1 on: 14/05/20 20:58 »
No, you are using methods that are not defined in PhreeqcRM. There are no methods with the names you have used. The only methods that begin RM_GetSurface... are

integer function    RM_GetSurfaceName (id, num, name)
integer function    RM_GetSurfaceSpeciesCount (id)
integer function    RM_GetSurfaceSpeciesName (id, num, name)
integer function    RM_GetSurfaceType (id, num, name)

You will have to use SELECTED_OUTPUT/USER_PUNCH to extract the information that you want. The methods above will allow you to get lists of surface names and surface species names.

The current documentation for PhreeqcRM is at https://water.usgs.gov/water-resources/software/PHREEQC/documentation/phreeqcrm/classphreeqcrm.html and in the doc directory of the PhreeqcRM distribution.
« Last Edit: 14/05/20 21:00 by dlparkhurst »
Logged

Yongqiang

  • Top Contributor
  • Posts: 123
Re: Version problems
« Reply #2 on: 14/05/20 21:38 »
Thank you, Parkhurst,

I got your points. Thanks a lot.

Regards,
Yongqiang
Logged

Yongqiang

  • Top Contributor
  • Posts: 123
Re: Version problems
« Reply #3 on: 14/05/20 22:21 »
Hi Parkhurst,

If to define some customized method in the RM_Interface_C.h, where to define the function for the method in RM_Interface_C.h. I went through the /src folder. However, there are too many files with similar names. I can't locate the file needed. Could you please give some advice?

Regards
Logged

Yongqiang

  • Top Contributor
  • Posts: 123
Re: Version problems
« Reply #4 on: 14/05/20 22:50 »
I found it: claim the method in RM_interface_C.h and define the function in RM_interface_C.cpp.

Regards,
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4074
Re: Version problems
« Reply #5 on: 14/05/20 23:17 »
That is a start, but all of the methods are really defined in PhreeqcRM.cpp, with wrappers for C and Fortran.

Sorry, but I don't want to write any more methods for PhreeqcRM and I don't want to guide you through it either.

It will be much simpler for you if you use the methods that I listed before to write SELECTED_OUTPUT and USER_PUNCH definitions that you define to the workers; then, process the selected output results with existing PhreeqcRM methods to get the information that you want. You should be able to do this in a general way.
Logged

Yongqiang

  • Top Contributor
  • Posts: 123
Re: Version problems
« Reply #6 on: 15/05/20 08:29 »
Dear Parkhurst,

Thank you for your advice.
I will follow it to code my work. Hope you stay well.

Thank you very much.

Regards,
Yongqiang
Logged

Yongqiang

  • Top Contributor
  • Posts: 123
Re: Version problems
« Reply #7 on: 16/05/20 14:59 »
Dear Parkhurst,

If the SELECTED_OUTPUT and User_punch are used to update the components between transport simulator and phreeqcrm, the output component must be written in a file and then read into the simulator? If so, I am concerned the speed would be affected. Is there a method to directly transfer variables between transport simulator and phreeqc?

Regards
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4074
Re: Version problems
« Reply #8 on: 16/05/20 19:39 »
Files are not used to transfer information between the transport model and PhreeqcRM. The module was written with efficiency in mind. Timing shows that transfer of data and dead processing time among multiple processors or processes can be as little as a few percent of the chemical calculation time.

PhreeqcRM does not use files with SELECTED_OUTPUT and USER_PUNCH. All data transfer is with internal storage unless MPI (multiprocess parallelization) is used, in which case MPI calls transfer data between processes.

Concentration data is sent to PhreeqcRM with SetConcentrations and retrieved from PhreeqcRM with GetConcentrations. In both cases an array of doubles is transferred through an argument.


« Last Edit: 16/05/20 19:47 by dlparkhurst »
Logged

Yongqiang

  • Top Contributor
  • Posts: 123
Re: Version problems
« Reply #9 on: 16/05/20 20:22 »
Got it. Thank you very much, Parkhurst.

Regards,
Yongqiang
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • Installation questions »
  • Version problems
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2