Dear DuMux Community,

I hope this email finds you well.

I am writing to kindly ask for your support in this matter:

Given:


  1.  I am using the porous medium flow model (injection problem)
  2.
The Problem is :

  1.
  template<class FVGridGeometry, class Scalar>
  class InjectionSpatialParams
: public FVSpatialParams<FVGridGeometry, Scalar, 
InjectionSpatialParams<FVGridGeometry, Scalar>>
  2.
  3.  PermeabilityType = Scalar
  4.  I am using PorosityAtPos (const GlobalPos& globalPos) const

  1.  {

                 if (isInCement_(globalPos))  {

                 // certain conditions
                 cementPorosity_ = equation (xxx)
               // at each globalpos[2] there is a new porosity value
                 return cementPorosity;

         }

               else if (isInAquifer_(globalPos))
               return aquiferPorosity_;
               else
                return overburdenPorosity_;
     }

  1.   I am using PermeabilityAtPos (const GlobalPos& globalPos) const
  2.
  3.

  1.  {

              Scalar cementPor_;
               Scalar cementK_;
               const Scalar dc_Porosity = 0.3;
               Scalar InitialCementK_ = 8.645e-13;

               if (isInCement_(globalPos))
           {

                cementPor_ = porosityAtPos( globalPos);    // calling porosity 
function
                cementK_ = InitialCementK_ *(std::pow(((1-dc_Porosity)/(1- 
cementPor_)),2) *(std::pow(( cementPor_/dc_Porosity), 3)));

               //std::cout<< " Porosity:"<< cementPor_ <<" Permeability:"<< 
cementK_ << std::endl;

              return cementK_;
            }

            else if (isInAquifer_(globalPos))
            return aquiferK_;
            else
            return overburdenK_;}


  1.  I am using a function to return permeability for additional vtk output :
  2.
  3.
const std::vector<Scalar>& getpermeability()
  4.

    {
        return permeability;


        }

  1.  I am using a function that updates the permeability for additional vtk 
output

           void updateVtkOutput(const SolutionVector& curSol)
         {
           auto fvGeometry = localView(this->gridGeometry());
           for (const auto& element : elements(this->gridGeometry().gridView()))
         {
            const auto elemSol = elementSolution(element, curSol, 
this->gridGeometry());
            fvGeometry.bindElement(element);

            for (auto&& scv : scvs(fvGeometry))
            {
                VolumeVariables volVars;
                volVars.update(elemSol, *this, element, scv);
                const auto dofIdxGlobal = scv.dofIndex();
                permeability_[dofIdxGlobal] = volVars.permeability();

            }
            }
            }

  1.  I added the following to return the permeability for addtional vtk output 
in main.cc:

         vtkWriter.addField(problem->getpermeability(), "Permeability");
          problem->updateVtkOutput(x);
          vtkWriter.write(0.0);

  1.  I am using also the following:

         unsigned int codim = GetPropType<TypeTag, 
Properties::GridGeometry>::discMethod == DiscretizationMethod::box? dim : 0;
         permeability_.resize(fvGridGeometry->gridView().size(codim));



Issue

  1.  I can see the different permeability values of the cement layer (which 
are dependent on porosity) while printing them in the terminal but not in vtu 
files and ParaView.
  2.  I can see in the vtu files only the initial value of permeability 
(constant) of the cement layer.

       Note: I can see the new porosity values of the cement layer in ParaView 
as well as upon printing them in the terminal (porosity changing with time)​

       So, how can I get the new values of permeability as appearing in the 
terminal in the vtu files ( similar to porosity)?


Thanks for your help.

Best Regards,
Mohammad Hodroj



_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to