Dear Bernd,

the problem which I'm considering at the moment is the viscous fingering in water/oil interaction for horizontal wells. I'm using a 2p sequential approach on structured and unstructured grids.


Grid adaptation is certainy useful in such a context (see for example, SPE-182636-MS) not only to save computational resources where not necessary but also to better follow the branching phenomenon which may appear on the finger front.


Up to now, I succeeded in adapting the grid but not locally, as shown in the previous picture. Thus, I'm asking some hints.


Secondly, another question: for such model approach, is it possible to put capillarity pressure to zero?


Best regards,

Lorenzo


On 24.01.2019 13:01, Flemisch, Bernd wrote:

Hi Lorenzo,


in general, we are really happy to help. But posing questions like this is very annoying for most of us. Please be specific. What is the problem that you are trying to solve? What is the model that you want to use? Do you have a sincere motivation to use adaptive grids or do you just like to produce pretty-looking pictures?


Kind regards

Bernd


--
_______________________________________________________________

Bernd Flemisch                         phone: +49 711 685 69162
IWS, Universität Stuttgart             fax:   +49 711 685 60430
Pfaffenwaldring 61            email: [email protected]
D-70569 Stuttgart            url: www.hydrosys.uni-stuttgart.de
_______________________________________________________________
------------------------------------------------------------------------
*Von:* Dumux <[email protected]> im Auftrag von lc <[email protected]>
*Gesendet:* Donnerstag, 24. Januar 2019 10:44:20
*An:* [email protected]
*Betreff:* [DuMuX] about grid adaptation
Good morning,

is it possible to obtain a grid adaptation such as the one shown in the
attachment, both for structured and unstructured grid?

If yes, could you please point me to the way to follow? On which
variable should I adapt?


Best regards,

Lorenzo

On 24.01.2019 11:18, Timo Koch wrote:
> Hi Ranjeet,
>
> please use a debugging tool like valgrind to find where your segmentation fault comes from. Maybe then we can help.
>
> Timo
>
>> Am 24.01.2019 um 08:08 schrieb Ranjeet kumar <[email protected]>:
>>
>> Hi All,
>> I want to add stresses value to the vtu file for the el2p problem. Based on geomechanics/poroselastic/main.cc, I tried to implementing the same for el2p problem. But I getting error segmentation fault error.
>>
>> // function to evaluate the element stresses
>> template< class StressType,
>>            class Problem,
>>            class GridGeometry,
>>            class GridVariables,
>>            class SolutionVector,
>>            class SigmaStorage>
>> void assembleElementStresses(SigmaStorage& sigmaStorage,
>>                               SigmaStorage& effSigmaStorage,
>>                               const Problem& problem,
>>                               const GridGeometry& fvGridGeometry,
>>                               const GridVariables& gridVariables,
>>                               const SolutionVector& x)
>> {
>>      for (const auto& element : elements(fvGridGeometry.gridView()))
>>      {
>>          auto fvGeometry = localView(fvGridGeometry);
>>          auto elemVolVars = localView(gridVariables.curGridVolVars());
>>
>>          fvGeometry.bind(element);
>>          elemVolVars.bind(element, fvGeometry, x);
>>
>>          // evaluate flux variables cache at cell center
>>          using FluxVarsCache = typename GridVariables::GridFluxVariablesCache::FluxVariablesCache;
>>          FluxVarsCache fluxVarsCache;
>>          fluxVarsCache.update(problem, element, fvGeometry, elemVolVars, element.geometry().center());
>>
>>          //get lame parameters, the pressure and compute stress tensor
>>          const auto sigma = StressType::stressTensor(problem, element, fvGeometry, elemVolVars, fluxVarsCache);          // this gives error >>          const auto effSigma = StressType::effectiveStressTensor(problem, element, fvGeometry, elemVolVars, fluxVarsCache);
>>
>>
>>          //std::vector<int> v{1,2,3};
>>          const auto eIdx = fvGridGeometry.elementMapper().index(element);
>>
>>          // pass values into storage container
>>          using FVGridGeometry = typename GridVariables::GridGeometry;
>>          for (int dir = 0; dir < FVGridGeometry::GridView::dimension; ++dir)
>>          {
>>              sigmaStorage[dir][eIdx] = sigma[dir];
>>              //sigmaStorage[dir][eIdx] = v[dir]; //sigma[dir];
>>              effSigmaStorage[dir][eIdx] = effSigma[dir];
>>              //effSigmaStorage[dir][eIdx] = v[dir];   //effSigma[dir];
>>          }
>>      }
>> }
>>
>> In main method,
>>
>>      //containers to store the sigma
>>      std::array<std::vector<ForceVector>, dim> sigmaStorage;
>>      std::array<std::vector<ForceVector>, dim> effSigmaStorage;
>>      const auto numCells = poroMechFvGridGeometry->gridView().size(0);
>>      std::for_each(sigmaStorage.begin(), sigmaStorage.end(), [numCells](auto& sigma){sigma.resize(numCells);}); >>      std::for_each(effSigmaStorage.begin(), effSigmaStorage.end(), [numCells](auto& effSigma){effSigma.resize(numCells);});
>>
>>      for (int dir = 0; dir < dim; ++dir)
>>      {
>> poroMechVtkWriter.addField(sigmaStorage[dir], "sigma_" + std::to_string(dir), PoroMechVtkOutputModule::FieldType::element); >> poroMechVtkWriter.addField(sigmaStorage[dir], "effSigma_" + std::to_string(dir), PoroMechVtkOutputModule::FieldType::element);
>>      }
>>
>>      using StressType = GetPropType<PoroMechTypeTag, Properties::StressType>;
>> assembleElementStresses<StressType>(sigmaStorage, effSigmaStorage,
>>              *poroMechProblem, *poroMechFvGridGeometry, *poroMechGridVariables, x[poroMechId]);
>>
>> Any help is appreciated.
>> Thank You!,
>>
>> Regards,
>> Ranjeet
>>
>>
>>
>> _______________________________________________
>> Dumux mailing list
>> [email protected]
>> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
> _______________________________________________
> Dumux mailing list
> [email protected]
> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

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

Reply via email to