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

Fix boundary conditions for implicit radiation; add the option of pure radial rays and function for user-defined frequency grid #639

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

yanfeij
Copy link
Contributor

@yanfeij yanfeij commented Dec 10, 2024

Closes #603

@buildbot-princeton
Copy link
Collaborator

Can one of the admins verify this patch?

@felker
Copy link
Contributor

felker commented Dec 10, 2024

add to whitelist

@felker felker changed the title fix boundary condition for implicit radiation, add the option of pure radial rays, add the function to use user-defined frequency grid Fix boundary conditions for implicit radiation; add the option of pure radial rays and function for user-defined frequency grid Dec 11, 2024
@felker
Copy link
Contributor

felker commented Dec 11, 2024

@apbailey can you check if this works for your test cases and completely closes #603?

@apbailey
Copy link
Collaborator

it's much better but also does not fix to machine precision -- for the equilibrium test I raised in the issue, the old code would not invoke the reflecting bcs and as a result velocities at the level of 1.0e-2 would develop after t=1.0. With reflecting bcs put in by hand through a user-defined rad bc, the velocity remained 0 to machine precision (1.0e-16). This fix produces v~1.0e-10 at t=1, obviously better but not equivalent to calling the rad bcs by enrolling them through the user-def framework. Took a brief look at the commit but did not see obvious cause of this discrepancy

@felker
Copy link
Contributor

felker commented Dec 11, 2024

thanks for the feedback @apbailey. I will take a look tomorrow; can you share your implementation?
@yanfeij any ideas?

@apbailey
Copy link
Collaborator

pgen and input files are in original post #603, it includes the user-def bc so just change between x1 bcs=user or bcs=reflecting to test the two implementations, no configure options other than -implicit_radiation

@yanfeij
Copy link
Contributor Author

yanfeij commented Dec 11, 2024 via email

@apbailey
Copy link
Collaborator

yes now the equilibrium is correct to machine precision, thanks for the fix @yanfeij

//----------------------------------------------------------------------------------------
//! \fn void RadBoundaryVariable::ApplyRadPhysicalBoundaries()
// \brief Apply physical boundaries for specific intensities only
void RadBoundaryVariable::ApplyRadPhysicalBoundaries(const Real time, const Real dt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am a bit confused by the introduction of this new function--- it seems to also be used for explicit radiation? Does that mean that the original issue #603 is also true for explicit radiation transfer?

@yanfeij
Copy link
Contributor Author

yanfeij commented Dec 17, 2024 via email

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.

Radiation boundary conditions are not applied in implicit radiation
4 participants