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

div3D producing NaNs in some 2D simulations #23

Closed
mattzett opened this issue May 14, 2020 · 4 comments
Closed

div3D producing NaNs in some 2D simulations #23

mattzett opened this issue May 14, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@mattzett
Copy link
Member

appears with glow_beam NS example

@mattzett mattzett self-assigned this May 14, 2020
@mattzett mattzett added the bug Something isn't working label May 14, 2020
@mattzett
Copy link
Member Author

It appears to be trying to compute a derivative with a zero value for dx2... Strange that this never was a problem before?!!

@mattzett
Copy link
Member Author

This issue is that the derivative functions are trying to compute the subgrid size from the input data size rather than from the grid structure itself... This is dangerous because various types of calculations require derivatives with a single row of ghost cells, etc...

@mattzett
Copy link
Member Author

mattzett commented May 14, 2020

This is really quite subtle - the pointers in the derivative functions need to be computed based on the size of the input data (lx2,lx3 local variables)bso that the correct differentials are available to each function. However, when checked whether we need to differentiate in a particular direction, we need to check the grid size itself (x%lx2,x%lx3) in that direction (only differentiate if non-singleton).

@scivision
Copy link
Member

scivision commented May 15, 2020

so it seems like e594245 src/numerical/calculus/div.f90 fixed this issue by using the meshgrid x% values as noted above, thanks

scivision referenced this issue May 15, 2020
fixed error in grid size determination in calculus module

more updates to deal with derivatives
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants