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

Add radiation #893

Merged
merged 21 commits into from
Jul 17, 2023
Merged

Add radiation #893

merged 21 commits into from
Jul 17, 2023

Conversation

majosm
Copy link
Collaborator

@majosm majosm commented Apr 28, 2023

Adds radiation sink term to fluid-wall coupling.

Questions for the review:

  • Is the scope and purpose of the PR clear?
    • The PR should have a description.
    • The PR should have a guide if needed (e.g., an ordering).
  • Is every top-level method and class documented? Are things that should be documented actually so?
  • Is the interface understandable? (I.e. can someone figure out what stuff does?) Is it well-defined?
  • Does the implementation do what the docstring claims?
  • Is everything that is implemented covered by tests?
  • Do you see any immediate risks or performance disadvantages with the design? Example: what do interface normals attach to?

@tulioricci
Copy link
Collaborator

@majosm , two comments:

  1. should we standardize the nomenclature of BCs? Right now, this is what we have:
    IsothermalSlipWallBoundary
    IsothermalWallBoundary
    AdiabaticSlipBoundary
    AdiabaticNoslipWallBoundary

  2. replace "wall_epsilon" with "wall_emissivity"

@majosm
Copy link
Collaborator Author

majosm commented Jul 11, 2023

  1. replace "wall_epsilon" with "wall_emissivity"

Done (forgot to push 🙂).

@MTCam
Copy link
Member

MTCam commented Jul 11, 2023

@majosm , two comments:

  1. should we standardize the nomenclature of BCs? Right now, this is what we have:
    IsothermalSlipWallBoundary
    IsothermalWallBoundary
    AdiabaticSlipBoundary
    AdiabaticNoslipWallBoundary

I dislike the disparity in naming, too. I also dislike when every BC has "WallBoundary" attached to it, if they all have it, then why have it at all? For me, these could easily be IsothermalSlip, IsothermalNoslip , etc. It's already known as a BC because we from mirgecom.boundary import IsothermalNoslip.

Now that we have multiple domains and materials, we could re-think some of the code structuring too, like renaming mirgecom.boundary to mirgecom.fluid_boundary. But again, these are all non-essential changes that can easily distract us and seem unimportant unless we are already set up to really nail the prediction.

Edit: also out of scope for this pr

Comment on lines 1611 to 1614
interface_radiation=interface_radiation,
wall_emissivity=wall_emissivity,
sigma=sigma,
ambient_temperature=ambient_temperature,
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the function is deprecated, I wouldn't updated it with radiation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tulioricci
Copy link
Collaborator

And we don't need to get the gradient here (

return_grad_u=return_gradients, dd=wall_dd, grad_u=wall_grad_temperature,
)
because it is already computed above

@@ -1421,6 +1652,10 @@ def basic_coupled_ns_heat_operator(
*,
time=0.,
interface_noslip=True,
interface_radiation=False,
wall_emissivity=None,
sigma=None,
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 default it to its actual value 5.67e-8?

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 worry about specifying default values for constants, because it invites the possibility of omitting them by accident, leading to silently incorrect results if the value is supposed to be something other than the default. Better to produce an error I think.

@majosm
Copy link
Collaborator Author

majosm commented Jul 13, 2023

And we don't need to get the gradient here (

return_grad_u=return_gradients, dd=wall_dd, grad_u=wall_grad_temperature,

)
because it is already computed above

It's not actually being recomputed there, since we're passing it in as grad_u (and similarly for the fluid side). So basically it's just cosmetic. I tried removing it (code here), but I don't know if it's any cleaner. 🤷‍♂️ Thoughts?

@tulioricci
Copy link
Collaborator

tulioricci commented Jul 13, 2023

And we don't need to get the gradient here (

return_grad_u=return_gradients, dd=wall_dd, grad_u=wall_grad_temperature,

)
because it is already computed above

It's not actually being recomputed there, since we're passing it in as grad_u (and similarly for the fluid side). So basically it's just cosmetic. I tried removing it (code here), but I don't know if it's any cleaner. man_shrugging Thoughts?

I prefer the new version, but it is not a big deal since, in practice, we may end up having this in the driver itself... 🤷‍♂️

@majosm majosm marked this pull request as ready for review July 14, 2023 19:33
@majosm majosm requested review from tulioricci and MTCam July 14, 2023 19:33
@tulioricci
Copy link
Collaborator

LGTM, but I will let @MTCam give the final word.

@majosm majosm mentioned this pull request Jul 17, 2023
8 tasks
Copy link
Member

@MTCam MTCam left a comment

Choose a reason for hiding this comment

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

👍

@tulioricci tulioricci merged commit 1869ca1 into illinois-ceesd:main Jul 17, 2023
13 checks passed
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