Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Varying the pressure during optimization #1585

Open
rahulgaur104 opened this issue Feb 14, 2025 · 2 comments
Open

Varying the pressure during optimization #1585

rahulgaur104 opened this issue Feb 14, 2025 · 2 comments
Labels
P1 Lowest Priority, will get to eventually theory Requires theory work before coding

Comments

@rahulgaur104
Copy link
Collaborator

rahulgaur104 commented Feb 14, 2025

It would be a useful tool to vary the pressure profile during optimization to see the effect of the pressure profile on various objectives, quality of equilibrium etc.

The pressure profile must always satisfy the following conditions

  1. monotonic and strictly non-increasing from core to edge
  2. pressure must always be a positive value

If we optimize for pressure using the current framework, it will violate one or both of these conditions.
Therefore, it would be useful to create an objective that uses a parametrization that always satisfies the two necessary conditions.

Something like p = a^2 * (1-rho) * ((1-rho)/(1 + (b^2)*rho^2))^(m^2) where a, b, m can vary during optimization. There must be a general way to do this.

@dpanici
Copy link
Collaborator

dpanici commented Feb 14, 2025

A way to account for simple effects like same shape profile but changing beta is to use eq.pressure=ScaledProfile(1.0, eq.pressure) as the pressure profile. The parameters of the new profile now is [scale, old_params] and so if you when you optimize do FixPressure(eq, indices=np.arange(eq.pressure.params.size)[1:]), it fixes all the params except for the scale factor on the pressure profile.

@dpanici dpanici added theory Requires theory work before coding P1 Lowest Priority, will get to eventually labels Feb 17, 2025
@dpanici
Copy link
Collaborator

dpanici commented Feb 19, 2025

TwoPowerProfile, MTanhProfile

desc.random has a monotonic profile generation method.

Parametrize derivative, enforce to be positive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Lowest Priority, will get to eventually theory Requires theory work before coding
Projects
None yet
Development

No branches or pull requests

2 participants