Click here to donate to keep PhreeqcUsers open
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forum Home
Login
Register
PhreeqcUsers Discussion Forum
»
Beginners
»
Installation questions
»
Version problems
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Version problems (Read 2039 times)
Yongqiang
Top Contributor
Posts: 100
Version problems
«
on:
May 14, 2020, 04:19:54 PM »
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
Top Contributor
Posts: 3585
Re: Version problems
«
Reply #1 on:
May 14, 2020, 08:58:43 PM »
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: May 14, 2020, 09:00:34 PM by dlparkhurst
»
Logged
Yongqiang
Top Contributor
Posts: 100
Re: Version problems
«
Reply #2 on:
May 14, 2020, 09:38:04 PM »
Thank you, Parkhurst,
I got your points. Thanks a lot.
Regards,
Yongqiang
Logged
Yongqiang
Top Contributor
Posts: 100
Re: Version problems
«
Reply #3 on:
May 14, 2020, 10:21:28 PM »
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: 100
Re: Version problems
«
Reply #4 on:
May 14, 2020, 10:50:59 PM »
I found it: claim the method in RM_interface_C.h and define the function in RM_interface_C.cpp.
Regards,
Logged
dlparkhurst
Top Contributor
Posts: 3585
Re: Version problems
«
Reply #5 on:
May 14, 2020, 11:17:18 PM »
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: 100
Re: Version problems
«
Reply #6 on:
May 15, 2020, 08:29:22 AM »
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: 100
Re: Version problems
«
Reply #7 on:
May 16, 2020, 02:59:38 PM »
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
Top Contributor
Posts: 3585
Re: Version problems
«
Reply #8 on:
May 16, 2020, 07:39:25 PM »
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: May 16, 2020, 07:47:41 PM by dlparkhurst
»
Logged
Yongqiang
Top Contributor
Posts: 100
Re: Version problems
«
Reply #9 on:
May 16, 2020, 08:22:06 PM »
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