Skip to content

Support EQDSK field#318

Open
Sichao25 wants to merge 10 commits into
SCOREC:developfrom
Sichao25:yus/field
Open

Support EQDSK field#318
Sichao25 wants to merge 10 commits into
SCOREC:developfrom
Sichao25:yus/field

Conversation

@Sichao25

@Sichao25 Sichao25 commented May 15, 2026

Copy link
Copy Markdown
Contributor

Support the load of EQDSK file and perform evaluation with uniform grid spline interpolator. Followed the data structure implemented in STOMMS. Close issue #242

@jacobmerson

Copy link
Copy Markdown
Collaborator

@Sichao25 can you take a look at what the configuration issue is? I got a bit behind on approving PRs while asics was offline.

@Sichao25

Sichao25 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@jacobmerson We have two pending updates in self hosted tests #322 and cmake tests #321 .

@jacobmerson

Copy link
Copy Markdown
Collaborator

Thanks I had missed those. They are merged now.

@jacobmerson

Copy link
Copy Markdown
Collaborator

I think we should add SplineFunctionSpace::FromEQDSK that can consume the EQDSKData struct. That would remove a lot of the boiler plate that the user would need to deal with when they want to work with EQDSK files. Internally, that could call the uniform grid constructor.

@Sichao25

Copy link
Copy Markdown
Contributor Author

@jacobmerson The new constructor has been implemented.

* @return EQDSKFieldWithData A struct containing the data, function space,
* and populated field, ready for evaluation.
*/
inline EQDSKFieldWithData MakeEQDSKField(const std::string& filename)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@usmanriaz07 Are there potentially other fields in the EQDSK that may need to be evaluated later, or is the only field we evaluated in the eqdsk the psi field?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We do use poloidal current value in the field line tracing. See the following piece of code:
https://github.com/SCOREC/STOMMS/blob/main/stomms_meshgen/src/eqdskData.cc#L197-L203

In ezfit.F90, the relevant function is: https://github.com/SCOREC/STOMMS/blob/main/stomms_meshgen/src/ezfit.F90#L562-L578

Other than poloidal current, we only need psi field.

namespace pcms
{

struct EQDSKField

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there ever a time where we would have an eqdsk with no data associated with it?

@Sichao25 Sichao25 Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There will always be an EQDSKData, but it doesn't have to be created with the helper functions defined here. It can be constructed manually instead of loaded directly from a file. The struct defined here is just for return values.

Comment thread src/pcms/field/function_space/spline.cpp Outdated
Comment thread src/pcms/field/function_space/spline.h Outdated
Comment thread src/pcms/field/eqdsk_field.h
Comment thread src/pcms/field/eqdsk_field.h
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.

3 participants