コード例 #1
0
ファイル: PorousFlow2PhasePP.C プロジェクト: Biyss/moose
void
PorousFlow2PhasePP::buildQpPPSS()
{
  _porepressure_nodal[_qp][0] = _phase0_porepressure_nodal[_qp];
  _porepressure_nodal[_qp][1] = _phase1_porepressure_nodal[_qp];
  _porepressure_qp[_qp][0] = _phase0_porepressure_qp[_qp];
  _porepressure_qp[_qp][1] = _phase1_porepressure_qp[_qp];
  _gradp_qp[_qp][0] = _phase0_gradp_qp[_qp];
  _gradp_qp[_qp][1] = _phase1_gradp_qp[_qp];

  const Real pc_nodal = _phase0_porepressure_nodal[_qp] - _phase1_porepressure_nodal[_qp]; // this is <= 0
  const Real seff_nodal = effectiveSaturation(pc_nodal);

  const Real pc_qp = _phase0_porepressure_qp[_qp] - _phase1_porepressure_qp[_qp]; // this is <= 0
  const Real seff_qp = effectiveSaturation(pc_qp);
  const Real dseff_qp = dEffectiveSaturation_dP(pc_qp); // d(seff_qp)/d(pc_qp)

  _saturation_nodal[_qp][0] = seff_nodal;
  _saturation_nodal[_qp][1] = 1.0 - seff_nodal;
  _saturation_qp[_qp][0] = seff_qp;
  _saturation_qp[_qp][1] = 1.0 - seff_qp;
  _grads_qp[_qp][0] = dseff_qp * (_gradp_qp[_qp][0] - _gradp_qp[_qp][1]);
  _grads_qp[_qp][1] = - _grads_qp[_qp][0];

  /// Temperature is the same in each phase presently
  _temperature_nodal[_qp][0] = _temperature_nodal_var[_qp];
  _temperature_nodal[_qp][1] = _temperature_nodal_var[_qp];
  _temperature_qp[_qp][0] = _temperature_qp_var[_qp];
  _temperature_qp[_qp][1] = _temperature_qp_var[_qp];
}
コード例 #2
0
void
PorousFlowRelativePermeabilityBase::computeQpProperties()
{
  // Effective saturation
  Real seff = effectiveSaturation(_saturation[_qp][_phase_num]);
  Real relperm, drelperm;

  if (seff < 0.0)
  {
    // Relative permeability is 0 for saturation less than residual
    relperm = 0.0;
    drelperm = 0.0;
  }
  else if (seff >= 0.0 && seff <= 1)
  {
    relperm = relativePermeability(seff);
    drelperm = dRelativePermeability(seff);
  }
  else // seff > 1
  {
    // Relative permeability is 1 when fully saturated
    relperm = 1.0;
    drelperm = 0.0;
  }

  _relative_permeability[_qp] = relperm * _scaling;
  _drelative_permeability_ds[_qp] = drelperm * _dseff_ds * _scaling;
}
コード例 #3
0
Real
PorousFlow2PhasePS_VG::d2CapillaryPressure_dS2(Real saturation) const
{
  Real seff = effectiveSaturation(saturation);
  return PorousFlowVanGenuchten::d2CapillaryPressure(seff, _alpha, _m, _pc_max) * _dseff_ds *
         _dseff_ds;
}
コード例 #4
0
ファイル: EffToAbsLaw.hpp プロジェクト: GitPaean/opm-material
    static typename std::enable_if<implementsTwoPhaseSatApi, Evaluation>::type
    twoPhaseSatPcnw(const Params &params, const Evaluation& SwAbs)
    {
        const Evaluation& SwEff = effectiveSaturation(params, SwAbs, Traits::wettingPhaseIdx);

        return EffLaw::twoPhaseSatPcnw(params, SwEff);
    }
コード例 #5
0
Real
PorousFlow2PhasePP::buildQpPPSS()
{
  _porepressure[_qp][0] = _phase0_porepressure[_qp];
  _porepressure[_qp][1] = _phase1_porepressure[_qp];
  const Real pc = _phase0_porepressure[_qp] - _phase1_porepressure[_qp]; // this is <= 0
  const Real seff = effectiveSaturation(pc);
  _saturation[_qp][0] = seff;
  _saturation[_qp][1] = 1.0 - seff;
  return pc;
}
コード例 #6
0
ファイル: PorousFlow2PhasePS.C プロジェクト: harterj/moose
Real
PorousFlow2PhasePS::buildQpPPSS()
{
  _saturation[_qp][0] = 1.0 - _phase1_saturation[_qp];
  _saturation[_qp][1] = _phase1_saturation[_qp];
  const Real seff = effectiveSaturation(_phase1_saturation[_qp]);
  const Real pc = capillaryPressure(seff);
  _porepressure[_qp][0] = _phase0_porepressure[_qp];
  _porepressure[_qp][1] = _phase0_porepressure[_qp] + pc;
  return seff;
}
コード例 #7
0
ファイル: EffToAbsLaw.hpp プロジェクト: GitPaean/opm-material
    static void relativePermeabilities(Container &values, const Params &params, const FluidState &fs)
    {
        typedef Opm::SaturationOverlayFluidState<FluidState> OverlayFluidState;

        OverlayFluidState overlayFs(fs);
        for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
            overlayFs.setSaturation(phaseIdx,
                                    effectiveSaturation(params,
                                                        fs.saturation(phaseIdx),
                                                        phaseIdx));
        }

        EffLaw::template relativePermeabilities<Container, OverlayFluidState>(values, params, overlayFs);
    }
コード例 #8
0
ファイル: EffToAbsLaw.hpp プロジェクト: OPM/opm-material
    static void capillaryPressures(Container& values, const Params& params, const FluidState& fs)
    {
        typedef Opm::SaturationOverlayFluidState<FluidState> OverlayFluidState;

        OverlayFluidState overlayFs(fs);
        for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
            overlayFs.setSaturation(phaseIdx,
                                    effectiveSaturation(params,
                                                        fs.saturation(phaseIdx),
                                                        phaseIdx));
        }

        EffLaw::template capillaryPressures<Container, OverlayFluidState>(values, params, overlayFs);
    }
コード例 #9
0
ファイル: EffToAbsLaw.hpp プロジェクト: GitPaean/opm-material
    static Evaluation krn(const Params &params, const FluidState &fs)
    {
        typedef Opm::SaturationOverlayFluidState<FluidState> OverlayFluidState;

        static_assert(FluidState::numPhases == numPhases,
                      "The fluid state and the material law must exhibit the same "
                      "number of phases!");

        OverlayFluidState overlayFs(fs);
        for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
            overlayFs.setSaturation(phaseIdx,
                                    effectiveSaturation(params,
                                                        fs.saturation(phaseIdx),
                                                        phaseIdx));
        }

        return EffLaw::template krn<OverlayFluidState, Evaluation>(params, overlayFs);
    }
コード例 #10
0
ファイル: EffToAbsLaw.hpp プロジェクト: OPM/opm-material
    static typename std::enable_if< (Traits::numPhases > 2), Evaluation>::type
    krg(const Params& params, const FluidState& fs)
    {
        typedef Opm::SaturationOverlayFluidState<FluidState> OverlayFluidState;

        static_assert(FluidState::numPhases == numPhases,
                      "The fluid state and the material law must exhibit the same "
                      "number of phases!");

        OverlayFluidState overlayFs(fs);
        for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
            overlayFs.setSaturation(phaseIdx,
                                    effectiveSaturation(params,
                                                        fs.saturation(phaseIdx),
                                                        phaseIdx));
        }

        return EffLaw::template krg<OverlayFluidState, Evaluation>(params, overlayFs);
    }
コード例 #11
0
ファイル: EffToAbsLaw.hpp プロジェクト: GitPaean/opm-material
 static typename std::enable_if<implementsTwoPhaseSatApi, Evaluation>::type
 twoPhaseSatKrn(const Params &params, const Evaluation& Sw)
 { return EffLaw::twoPhaseSatKrn(params, effectiveSaturation(params, Sw, Traits::nonWettingPhaseIdx)); }
コード例 #12
0
void
PorousFlow1PhaseP::buildQpPPSS()
{
  _porepressure[_qp][0] = _porepressure_var[_qp];
  _saturation[_qp][0] = effectiveSaturation(_porepressure_var[_qp]);
}