Skip to content

Gravity#5

Open
LineColin wants to merge 3 commits intomasterfrom
gravity_pr
Open

Gravity#5
LineColin wants to merge 3 commits intomasterfrom
gravity_pr

Conversation

@LineColin
Copy link
Collaborator

Add an option to take into account gravity acceleration that varies linearly with radius.

Line Colin added 3 commits May 16, 2025 16:48
…, g(r) = -g_0 r e_r). Add an option in the definition of the problem and modify the matrix
commit 5cbbdcedca625852772a7e31fa0092b8466fb0ab
Author: Line Colin <line.colin@ens-lyon.fr>
Date:   Fri May 16 17:05:14 2025 +0200

    Add the option for uniform or radius dependant gravity acceleration

This update introduces the option of choosing between uniform and radius-dependent gravity acceleration in the SphStability class.

The gravity acceleration that depends of the radius is defined as:

	g(r) = - g_0 * r * e_r

The 'uniform_gravity' boolean flag has been added to the dataclass to control this option. When set to 'False', gravity acceleration varies linearly with radius.

This change required modifications in 'lmat'.
@amorison
Copy link
Owner

@LineColin Thanks for your contribution. In order to keep the code modular, I've implemented the same idea in a slightly different fashion in the gravity branch. In particular, this other branch also applies the desired gravity to the compositional field when relevant, and would allow us to define other gravity modes in the future if we want to.

Could you confirm that the gravity branch gives you consistent results with your implementation? Do you also know of a benchmark from the literature we could use to test this? If not, I'll look into Chandrasekhar's book, there might be a relevant case there.

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.

2 participants