PhreeqcUsers Discussion Forum
Click here to donate to keep PhreeqcUsers open

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Corresponding relation between RM_GetSpeciesName and RM_GetSpeciesConcentrations
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Corresponding relation between RM_GetSpeciesName and RM_GetSpeciesConcentrations  (Read 135 times)

Yongqiang

  • Top Contributor
  • Posts: 93
Corresponding relation between RM_GetSpeciesName and RM_GetSpeciesConcentrations
« on: September 28, 2023, 02:01:47 AM »
Hi Phreeqc developpers,

I wonder if the output array can correspond to each other between  RM_GetSpeciesName and RM_GetSpeciesConcentrations.
Does the position of species name (e.g., Na+) corresponds to the concentration in the same position in the output array from RM_GetSpeciesConcentrations?

Thanks
Logged

dlparkhurst

  • Top Contributor
  • Posts: 3174
Re: Corresponding relation between RM_GetSpeciesName and RM_GetSpeciesConcentrations
« Reply #1 on: September 28, 2023, 02:32:02 AM »
Yes. The order of the species in RM_GetSpeciesConcentrations and RM_SetSpeciesConcentrations is given by the list retrieved with calls to RM_GetSpeciesName.

Code: [Select]
status = RM_SetSpeciesSaveOn(id, 1)
 ncomps = RM_FindComponents(id)
 nspecies = RM_GetSpeciesCount(id)
 do i = 1, nspecies
   status = RM_GetSpeciesName(id, i, name)
   write(*,*) name
 enddo

For transport modeling with the same dispersion coefficient for all elements, it is only necessary to transport the total concentrations (RM_GetConcentrations). If you are modeling multicomponent diffusion where each species can diffuse with a different diffusion coefficient (usually subject to a zero-net-current constraint), then you need to get the concentrations of each individual species for the transport calculations.
Logged

Yongqiang

  • Top Contributor
  • Posts: 93
Re: Corresponding relation between RM_GetSpeciesName and RM_GetSpeciesConcentrations
« Reply #2 on: September 28, 2023, 04:29:27 AM »
Thanks, David.

Just to confirm again: The order of the species CONCENTRATION in RM_GetSpeciesConcentrations is the same with order of species NAME in RM_GetSpeciesName()?

Thanks
Yongqiang
« Last Edit: September 28, 2023, 04:33:02 AM by Yongqiang »
Logged

dlparkhurst

  • Top Contributor
  • Posts: 3174
Re: Corresponding relation between RM_GetSpeciesName and RM_GetSpeciesConcentrations
« Reply #3 on: September 28, 2023, 04:46:24 AM »
Yes.
Logged

Yongqiang

  • Top Contributor
  • Posts: 93
Re: Corresponding relation between RM_GetSpeciesName and RM_GetSpeciesConcentrations
« Reply #4 on: September 28, 2023, 04:51:18 AM »
Thanks for the confirmation, David!!
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Corresponding relation between RM_GetSpeciesName and RM_GetSpeciesConcentrations
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2