AdrienWehrle / diuca

GNU Lesser General Public License v2.1
0 stars 1 forks source link

Add `FVSedimentMaterial` #8

Closed AdrienWehrle closed 7 months ago

AdrienWehrle commented 7 months ago

We need this object to have a better representation of basal slip in case we use FV instead of FE in the final setup.

I'll write it shortly based on FVIceMaterial.

AdrienWehrle commented 7 months ago

compilation gives

[local_path]/diuca/src/materials/FVSedimentMaterialSI.C:83:15: error: 'viscosity' was not declared in this scope
   83 |  ADReal eta = viscosity;

I need to access the current viscosity of the material while this very value is being returned as a FunctorProperty. In AD I could just call _viscosity[_qp] but need to find the way to do it in FV. Maybe @GiudGiud can help here?

https://github.com/AdrienWehrle/diuca/blob/7eec1efce654e49d65a47f475357131d37f3b2ae/src/materials/FVSedimentMaterialSI.C#L83

GiudGiud commented 7 months ago

Is it supposed to be a constant? viscosity is defined later in that source file

AdrienWehrle commented 7 months ago

Is it supposed to be a constant? viscosity is defined later in that source file

No but viscosity at timestep t is needed to compute the one at timestep t+1

GiudGiud commented 7 months ago

at the top of the file #include MooseFunctorArguments.h

_viscosity(getFunctor<ADReal>("mu") in the constructor

in the body of the viscosity functor

StateArg previous_time(1, SolutionIterationType::Time);
viscosity = _viscosity(r, previous_time);
AdrienWehrle commented 7 months ago

Thanks a lot it's compiling without error now. I had to call StateArg and SolutionIterationType through Moose:: though, maybe there are two ways to call them? (either import header or call Moose::?

GiudGiud commented 7 months ago

Ok this is normal they are in the Moose namespace