Wiki

Clone wiki

pflotran / Developers / CodeDevelopment / RTWorkflow

process_model%InitializeTimestep()
  - set weighted parameters to time level T

  RTInitializeTimestep->RTUpdateFixedAccumulation
    -updates rtauxvars using tran_xx while NOT updating activity coefficients

do

  process_model%PreSolve()
    - set weighted parameters to time level T + dT
    - calculate transport coefficients
    - updates cell and boundary auxvars while activity coefficients
    - copies tran_xx to tran_log_xx and puts in log form
    - updated data mediator mass transfer


  SNESSolve()

    RTResidual()
      - converts tran_log_xx to non-log tran_xx and communicates to tran_xx_loc

      RTResidualFlux()
        - if not up to date, updates cell and boundary auxvars while NOT
          updating activity coefficients (assuming updated at TS, not NI)
        - calculates internal and boundary fluxes
      RTResidualNonFlux()
        - calculates accumulation, src/sink, reaction
        - zeros inactive cells
        - add mass transfer vec

    RTJacobian
      - adds jacobian entries corresponding to the above

  if converged exit

  else

    process_model%TimeCut()
      - calculate weights for new time level T + dT [= T + 1/2 dT]

      RTTimeCut()
        - copy tran_yy to tran_xx
        - set weighted parameters back to old time level T

        RTInitializeTimestep->RTUpdateFixedAccumulation
          -updates rtauxvars using tran_xx while NOT updating
           activity coefficients

        - set weighted parameters to new time level T + dT
        - calculate transport coefficients

enddo

RTUpdateEquilibriumState
  - update rtauxvars
RTUpdateKineticState
  RUpdateKineticState
    -update mineral volume fractions
    -update sorbed concentrations for kinetic surface complexation

Updated