Skip to content

Conversation

tduretz
Copy link
Collaborator

@tduretz tduretz commented Oct 8, 2022

We can store some example of usage of GeoParams together with simple PT codes.
So far only VE loading and inclusion VE loading work.
The codes are unstable and they need an improved damping strategy. I will take care of that soon.
Would be great to invite @boriskaus to this repository such that he can follow and contribute.
Once we get all basic scripts work (including future VEVP and power-law VE runs) we can think of moving the
scripts to a more appropriate repo (GeoParams?).

@boriskaus
Copy link
Collaborator

Sounds good - as to putting this back to the GeoParams repo: I would prefer to have a separate repository and leave GeoParams strictly for the point wise computations. Note that in JustRelax we are collecting pseudotransient solvers (which should work with ParallelStencil and GeoParams). Perhaps an idea to store some solvers there that don’t rely on external packages like PS?

@tduretz
Copy link
Collaborator Author

tduretz commented Oct 8, 2022

Great, I've pushed VE benchmark and VE inclusion with improved damping strategy. They should be much better basis for VEVP implementations. They now include design of PT parameters based on Räss et al. (2022). The damping is applied on the residual rather than on flux components.
Let's keep these examples in a separate repository, which we could somehow link to Julia Geodynamics.

Copy link
Collaborator

@boriskaus boriskaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should work

@luraess
Copy link
Member

luraess commented Oct 9, 2022

Thanks @tduretz for the contribution! I invited @boriskaus to the repo as well.
I agree that we could at some point move these example to a separate repo that may differ from GeoParams (unless we'd like to have a GD example in there). TBD.

Copy link
Member

@luraess luraess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tduretz can you add a .gitignore and include in there .DS_Store and .vscode?

Also, you may want to have to scripts in a scripts folder to keep the src for potentially have the main module if needed at some point in there (e.g. in case of adding unit/reference tests).

@boriskaus boriskaus changed the title add examples of usage of GeoPrams in basic PT codes add examples of usage of GeoParams in basic PT codes Oct 21, 2022
@albert-de-montserrat
Copy link
Collaborator

This is something that we still need (I think) to add to the rheology kernels, but you should not do v = MatParam[Phasec[i]].CompositeRheology[1] as it is type unstable. This should be replace by phase_viscosity(MatParam, ε̇iic[i], Phasec[i], args) where

@generated function phase_viscosity(v::NTuple{N,Any}, ε̇ii, phase, args) where N
    quote
        Base.@_inline_meta
        Base.@nexprs $N i -> v[i].Phase === phase && return computeViscosity_εII(v[i].CompositeRheology[1], ε̇ii, args)        
    end
end

This results in about x3.5 speedup in the GeoParams version. I will address this issue in GeoParams when I have a spare minute.

Duretz Thibault and others added 2 commits October 26, 2022 11:32
example with (regularised) Drucker-Prager plasticity used through GeoParams
Copy link
Collaborator Author

@tduretz tduretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now get:
ERROR: UndefVarError: DruckerPrager_regularised not defined
Should this be defined somewhere in the script or is it a new GP functionality?

@boriskaus
Copy link
Collaborator

that's new in GeoParams; you should link the code with GeoParams#main, or GeoParams#adm-cuda-check if you also want the latest cuda-check turned off. I can also upload my manifest

added Manifest file (so you have the correct version of GeoParams)
the previous comparison between GeoParams & the native implementation was not entirely fair, as the GeoParams version was updating both vertices and centers whereas the native version only updated centers.

This code makes them more similar (and timings are more similar as well). Yet there appears to be a bug in the "native" VEP version as it explodes even in the purely viscoelastic case. I don't see where I go wrong, so save the current effort
added a version that computes plasticity using invariants; times between the GeoParams and native implementation are much closer now & results the same
@luraess
Copy link
Member

luraess commented Nov 13, 2022

In the codes, shouldn't one use updated pressure in momentum equation (as "usual")? That would make the scheme slightly more stable.

@tduretz
Copy link
Collaborator Author

tduretz commented Nov 14, 2022

Yes

In the codes, shouldn't one use updated pressure in momentum equation (as "usual")? That would make the scheme slightly more stable.

Yes, this can help a little bit. I do this in the latest example with dilation.

@luraess
Copy link
Member

luraess commented Sep 23, 2023

What is that status here? Could I merge this upon resolving the conflicts?

@boriskaus
Copy link
Collaborator

Hmm, good question. Yes I think it is ok to merge (haven’t run it in a long time, though)

@tduretz
Copy link
Collaborator Author

tduretz commented Sep 23, 2023

I have a suggestion. What about we rename the folder examples, which would contain several examples of what one can do with GP. We could have subfolders like '1_flow_laws' (the most basic stuff were discussing about earlier this week, potentially notebooks), '2_deformation_maps' and '3_2D_simulations'. We should still identify which codes in this branch is worth keeping and then move them to '/examples/3_2D_simulations'.

@luraess
Copy link
Member

luraess commented Sep 23, 2023

Organising script within distinct examples with respective folders may be a good idea.

@boriskaus
Copy link
Collaborator

Good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants