Skip to content

Close #13#39

Merged
sbryngelson merged 2 commits intoMFlowCode:masterfrom
anshgupta1234:fix_13
Jan 1, 2023
Merged

Close #13#39
sbryngelson merged 2 commits intoMFlowCode:masterfrom
anshgupta1234:fix_13

Conversation

@anshgupta1234
Copy link
Contributor

In m_variables_conversion in pre_process and post_process, added a pointer s_compute_pressure that points to 3 new subroutines:

  • s_compute_pressure_from_energy (when model_eqns != 4 and no bubbles)
  • s_compute_pressure_from_bubbles (when model_eqns != 4 and bubbles)
  • s_compute_pressure_4eqns (when model_eqns == 4)

In m_data_output in pre_process and m_variables_conversion in pre and post-process, the EOS has been replaced by a call to s_compute_pressure

@henryleberre henryleberre linked an issue Nov 13, 2022 that may be closed by this pull request
henryleberre added a commit to anshgupta1234/MFC that referenced this pull request Nov 13, 2022
@henryleberre henryleberre self-requested a review as a code owner November 13, 2022 05:26
henryleberre added a commit to anshgupta1234/MFC that referenced this pull request Nov 13, 2022
@henryleberre henryleberre force-pushed the fix_13 branch 2 times, most recently from 34ff5b4 to 5bea2ec Compare November 13, 2022 05:46
@sbryngelson
Copy link
Member

Does this work on GPUs? Can you verify that the post-processing .silo files are the same before and after this change (they aren't part of the CI).

@sbryngelson
Copy link
Member

You also did not modify the simulation code, which is part of this issue

@henryleberre
Copy link
Collaborator

@anshgupta1234 You might also want to consider placing these subroutines in a file in src/common

@anshgupta1234
Copy link
Contributor Author

@henryleberre Actually, the subroutines are slightly different in pre_process and post_process so I probably can't do that 😅

@sbryngelson
Copy link
Member

@henryleberre Actually, the subroutines are slightly different in pre_process and post_process so I probably can't do that 😅

Consider changing and refactoring them so that they can all be the same.

@anshgupta1234
Copy link
Contributor Author

Sure! I think I can refactor them and try to bring them into src/common. Is there any specific file I should bring it into or create a new module?

I'll also work on simulation, but that might take a while since it has to be compatible with OpenACC.

Apart from that, I actually don't have any GPUs on my laptop so I'm unsure if I can do GPU testing for this code.

@sbryngelson
Copy link
Member

sbryngelson commented Nov 14, 2022

It should probably be a new module. Probably m_variables_convert.f90. I added you to a GPU cluster, you will receive instructions for that via email.

@anshgupta1234
Copy link
Contributor Author

Great! I'll test it out on a GPU whenever I have the chance. Till then, I did make sure to run examples/2D_shockbubble and examples/2D_axisym_shockbubble on this branch and master, and they both looked identical in ParaView.

In this latest commit, I did name the module m_compute_pressure because naming it m_variables_convert might be more confusing when importing in other files, and could look like:

use m_variables_conversion    ! From local dir
use m_variables_convert       ! From src/common

If this is not an issue, I can definitely change the file name :)

@sbryngelson
Copy link
Member

I think this PR should also try to move as much of m_variables_conversion.f90 to a common location as possible (perhaps all of it!). Great job so far.

@sbryngelson
Copy link
Member

@anshgupta1234 what is the status of this? I cannot tell.

@anshgupta1234
Copy link
Contributor Author

@sbryngelson the status of this PR is incomplete. It actually represents the branch for just moving all the pressure subroutines to a new module, but then we decided to pivot to moving all of m_variables_conversion to common, which I'm working on in a different branch that's based off of this one. Perhaps it might be better to close this PR and I can just create a new one when I'm done with the new task?

@henryleberre henryleberre marked this pull request as draft December 12, 2022 07:15
@sbryngelson
Copy link
Member

It's fine how it is I was just curious.

@henryleberre henryleberre marked this pull request as ready for review December 29, 2022 19:24
@henryleberre henryleberre added the enhancement New feature or request label Dec 29, 2022
Added missing comments and removed author and date from common/m_var_conversion

Co-Authored-By: Henry LE BERRE <hberre3@gatech.edu>
@sbryngelson sbryngelson merged commit 83528f1 into MFlowCode:master Jan 1, 2023
@anshgupta1234 anshgupta1234 deleted the fix_13 branch January 5, 2023 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

Equation of state is not DRY

3 participants