underworldcode / UWGeodynamics

Underworld Geodynamics
Other
81 stars 32 forks source link

PT path for Lagrangian Particles: stepwise Pressure record #116

Closed BenedicteCT closed 5 years ago

BenedicteCT commented 5 years ago

The Pressure recorded on Lagrangian Particles as (Lag_Grid.add_tracked_field(Model.pressureField, name="LagGridPress", units=u.megapascal, dataType="float") is discontinuous, showing steps in pressure (see screen shot1). Screen Shot1

However, plotting against y (screen shot2) yields a smooth curve. Screen Shot2

Is there any possibility to record a smoothed instead of discretised pressure in order to get a continuous PT trajectory ?

rbeucher commented 5 years ago

Hi @BenedicteCT ,

Was the first plot done right after Model inititialization, meaning the pressure is the lithostatic pressure?

BenedicteCT commented 5 years ago

Screen Shot 2019-04-17 at 3 19 45 pm After having run model init, the Pressure profile looks like the attached screenshot.

rbeucher commented 5 years ago

OK that's fine. But what about the first plot you posted. Was it just after the model init or after reading at least one solve?

BenedicteCT commented 5 years ago

The two first plots are generated through post processing (python script) of the data recorded on Lagrangian particles after the model has finished running.

julesghub commented 5 years ago

@BenedicteCT Q1/P0 elements for Stokes (the default FEM element types in underworld) will produce a discontinuous pressure solutions across elements, so the jumps aren't surprising.

@rbeucher is the Model.pressureField projected? If not, projecting should help, although it'll be less accurate and high gradients could cause oscillations.

rbeucher commented 5 years ago

@julian you mean on the mesh? I will check but I'm pretty sure it's not.

julesghub commented 5 years ago

@Julian you mean on the mesh? I will check but I'm pretty sure it's not.

Yes

rbeucher commented 5 years ago

Hi Benedicte,

So it's not really an issue but more a consequence of the type of elements we use by default in Underworld. The pressure is calculated on discrete elements Q0 that basically give us a value of the pressure for each cell and the transition from one element to one neighbour is slightly discontinuous (or very if the resolution is poor).

If I understand the plot you sent me you basically have a set of tracers with different depths...

I could use some tricks to make it look smoother but that won't make it more accurate...the temperature is better resolved which explains why your second plot is smoother.

You could increase the resolution and that should make things better.

Now Q0 elements are clearly not ideal, you could use Q1 elements which can resolve the pressure gradient inside elements. I am working on it now but I want to test things properly.

Romain

rbeucher commented 5 years ago

131 More documentation coming