AdrienWehrle / diuca

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

Ramp up viscosity slowly #21

Closed GiudGiud closed 4 months ago

GiudGiud commented 4 months ago

Hey @AdrienWehrle

I got some results with FV by ramping up velocity 1 order of magnitude per 1 order of magnitude. I did it manually but you can do this programmatically by:

GiudGiud commented 4 months ago

Pressure looks great and velocity is peaking at the top at 1e-4 m/s so 300 m/year. It s close to our inlet velocity of 0.1 m/hr.

GiudGiud commented 4 months ago

looking at the velocity results, they are still evolving, smoothly but evolving a long the X direction near the outlet. So the flow is not fully developed

AdrienWehrle commented 4 months ago

Pressure looks great and velocity is peaking at the top at 1e-4 m/s so 300 m/year. It s close to our inlet velocity of 0.1 m/hr.

Thanks a lot, 300m/year sounds great, that's a pretty good order of magnitude for a glacier like this with no slip!

AdrienWehrle commented 4 months ago

I got some results with FV by ramping up velocity 1 order of magnitude per 1 order of magnitude.

That makes me think of the trial I did at some point based on the failed solves webpage of MOOSE: adding a strong diffusion term that would be removed exponentially. Would that have a similar effect?

GiudGiud commented 4 months ago

I think what i did was more slowly ramping up diffusion than ramping it down. We have a ton of diffusion. I commented out the advective term eventually too

AdrienWehrle commented 4 months ago

Pressure looks great and velocity is peaking at the top at 1e-4 m/s so 300 m/year. It s close to our inlet velocity of 0.1 m/hr.

That is 3km/year I think though, which is even better!

AdrienWehrle commented 4 months ago

I commented out the advective term eventually too

What does that imply? I'm not sure I understand how that is affecting the results.

GiudGiud commented 4 months ago

It implies the flow is driven by a diffusive process rather than advection. You can put it back in, you just may have to redo the ramp-up

I dont expect a big difference

AdrienWehrle commented 4 months ago

looking at the velocity results, they are still evolving, smoothly but evolving a long the X direction near the outlet. So the flow is not fully developed

It looks great! What I'm not sure I understand is that although we prescribe a null velocity at the base, I see non null values on the bottom boundary in Paraview. Is that the case for you too?

AdrienWehrle commented 4 months ago

I got some results with FV by ramping up velocity 1 order of magnitude per 1 order of magnitude.

Maybe that's a strategy we could use to get the FE problem to converge on a better result too!

GiudGiud commented 4 months ago

It looks great! What I'm not sure I understand is that although we prescribe a null velocity at the base, I see non null values on the bottom boundary in Paraview. Is that the case for you too?

null velocity is on the face, the value you see is a center-cell value in finite volume

GiudGiud commented 4 months ago

Maybe that's a strategy we could use to get the FE problem to converge on a better result too!

I tried. Sadly no

AdrienWehrle commented 4 months ago

It looks great! What I'm not sure I understand is that although we prescribe a null velocity at the base, I see non null values on the bottom boundary in Paraview. Is that the case for you too?

null velocity is on the face, the value you see is a center-cell value in finite volume

Oh I see, thank you for the explanation!

AdrienWehrle commented 4 months ago

I tried. Sadly no

@GiudGiud, could you share how you made II_eps_min controllable on the FE system if you still have it saved? I did it in a similar way as for the FV system but I run into the following error

*** ERROR ***
Failed to set the 'Materials/ice/II_eps_min' parameter the supplied template argument must be of type 'MetaPhysicL::DualNumber<double, MetaPhysicL::SemiDynamicSparseNumberArray<double, unsigned long, MetaPhysicL::NWrapper<300ul> >, true>'.

And I don't really get it. I'm passing what is a Real through the function but maybe need to convert it to AD or even drop the ADReal for a Real or double? Thanks a lot for your help.

even if rampup doesn't work in the FE system as you mentioned, I still would like to explore to see if I can manually get away from the nullspace solution.

My modifications can be seen here: https://github.com/AdrienWehrle/diuca/pull/25/files

GiudGiud commented 4 months ago

Make sure II_eps_min is a Real not a ADReal. both in the header and in the source

AdrienWehrle commented 4 months ago

Thanks, that worked indeed, I still had it as ADReal in my header.

I tried so many different setups with different II_eps_min but nothing would move the solution even slightly... Maybe an active nullspace removal would help, but probably I should just focus on the FV setup as we said.