Skip to content

Conversation

@adamdempsey90
Copy link
Collaborator

Background

This adds support for the ideal gas H/He mixture from D'Angelo+2013 and more general tabular equations of state using spiner.

There were some minor updates to the Riemann solvers and I've added both temperature and bulk modulus as allocated variables (the latter is needed for the solvers and the former is for outputs since the mapping from pressure and density is no longer trivial).

I've added a shock tube example demonstrating that this works. Testing is still ongoing. Shearing sheet seems to work.

There is likely some cleanup required in the EOS file itself, too.

Description of Changes

Checklist

  • New features are documented
  • Tests added for bug fixes and new features
  • (@lanl.gov employees) Update copyright on changed files

@adamdempsey90 adamdempsey90 marked this pull request as ready for review October 7, 2025 22:47
@adamdempsey90 adamdempsey90 requested a review from pdmullen October 7, 2025 22:47
@adamdempsey90
Copy link
Collaborator Author

@pdmullen should be ready for review

Copy link
Collaborator Author

@adamdempsey90 adamdempsey90 left a comment

Choose a reason for hiding this comment

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

Still need docs

Comment on lines +321 to +322
w_b = eos_d.BulkModulusFromDensityInternalEnergy(w_d, w_s, lambda);
w_t = eos_d.TemperatureFromDensityInternalEnergy(w_d, w_s, lambda);
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we are storing/tracking temperature now, should we change other EOS calls to *FromDensityTemperature? I like working in (rho, T) space since rho and T are guaranteed to be positive unlike sie (for general EOS).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't really want to carry temperature around. It's only here so we can output it, but there might be other ways to do that. But the proper formulation is density internal energy, so I'd prefer to keep that as is.

Real rtp = xcyl[0] + dxr;
Real rtm = xcyl[0] - dxr;

// this is a mess
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's going on inside here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need dPhi/dR in cylindrical coordinates, so I am approximating the gradient in whatever coordinate system we are running in and dotting it into the rhat unit vector.

v(0, gas::prim::density(0), k, j, i) = dens;
v(0, gas::prim::sie(0), k, j, i) = pars.g_pres / ((gamma - 1.0) * dens);
// input density and pressure
v(0, gas::prim::sie(0), k, j, i) = ArtemisUtils::EofPR(eos, pres, dens);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we be setting temperature as a primitive variable instead of sie now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, I think we should still keep it sie


} // namespace ArtemisEOS

#endif // UTILS_EOS_IDEAL_H_HE_HPP_
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a lot of work...

Real &wl_ivz = wl(ivz, i);
Real &wl_ipr = wl(IPR, i);
Real &wl_ise = wl(ISE, i);
Real &wl_ibl = wl(IBL, i);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I thought for normal hllc (i.e., not ghllc) that we were going to stay with the original reconstructions such that we maintain thermodynamic consistency for ideal gases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it would help me a little more if you explicitly spelled out how to do that (or pushed some changes that do that).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have added an extra step during reconstruction that makes all of the reconstructions self-consistent. I have chosen density and pressure as the ground truth. I chose pressure so that I can investigate hydrostatic reconstructions in the near future.

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