-
Notifications
You must be signed in to change notification settings - Fork 105
Make surface tension compatible with the 5-eqn model and immersed boundaries #821
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #821 +/- ##
==========================================
- Coverage 43.63% 43.61% -0.03%
==========================================
Files 66 66
Lines 19835 19846 +11
Branches 2433 2436 +3
==========================================
Hits 8655 8655
- Misses 9688 9697 +9
- Partials 1492 1494 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -1212,7 +1212,7 @@ contains | |||
chemxb = species_idx%beg | |||
chemxe = species_idx%end | |||
|
|||
!$acc update device(momxb, momxe, advxb, advxe, contxb, contxe, bubxb, bubxe, intxb, intxe, sys_size, buff_size, E_idx, alf_idx, n_idx, adv_n, adap_dt, pi_fac, strxb, strxe, chemxb, chemxe) | |||
!$acc update device(momxb, momxe, advxb, advxe, contxb, contxe, bubxb, bubxe, intxb, intxe, sys_size, buff_size, E_idx, alf_idx, n_idx, adv_n, adap_dt, pi_fac, strxb, strxe, chemxb, chemxe, c_idx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just do eqn_idx%<whatever>
where <whatever> -> {color,energy,alpha,...}
please open a PR for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the variables at line 230?
eqn_idx%E_idx !< Index of energy equation
eqn_idx%n_idx !< Index of number density
eqn_idx%alf_idx !< Index of void fraction
eqn_idx%gamma_idx !< Index of specific heat ratio func. eqn.
eqn_idx%pi_inf_idx !< Index of liquid stiffness func. eqn.
eqn_idx%b_size !< Number of elements in the symmetric b tensor, plus one
eqn_idx%tensor_size !< Number of elements in the full tensor plus one
eqn_idx%c_idx !< Index of color function
eqn_idx%damage_idx !< Index of damage state variable (D) for continuum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i meant all of the equations @mohdsaid497566 . you will see there are many other _idx variables (i think?)
@@ -135,6 +135,7 @@ contains | |||
|
|||
real(wp) :: pres_IP, coeff | |||
real(wp), dimension(3) :: vel_IP, vel_norm_IP | |||
real(wp) :: c_IP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't each IP
be a derived type with components alpha_rho,alpha,pressure,vel,c,r,v,pb,mv,nmom,...
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added "ip" where type(point_data) :: ip
type :: point_data
real(wp), dimension(:), allocatable :: alpha_rho !< Partial densities
real(wp), dimension(:), allocatable :: alpha !< Volume fractions
real(wp) :: pressure !< Pressure
real(wp), dimension(3) :: vel !< Velocity
real(wp) :: c !< Color function (for surface tension)
real(wp), dimension(:), allocatable :: r !< Bubble radii
real(wp), dimension(:), allocatable :: v !< Bubble radial velocities
real(wp), dimension(:), allocatable :: pb !< Bubble pressures
real(wp), dimension(:), allocatable :: mv !< Mass of vapor
real(wp), dimension(:), allocatable :: nmom !< Moments for QBMM
real(wp), dimension(:), allocatable :: presb !< Node pressures for bubbles
real(wp), dimension(:), allocatable :: massv !< Node masses for bubbles
end type point_data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, assuming it works of course
@@ -758,6 +774,8 @@ contains | |||
pres_IP = 0._wp | |||
vel_IP = 0._wp | |||
|
|||
if (surface_tension) c_IP = 0._wp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should c_IP
be optional? if surface tension is optional, just like bubbles_euler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to have I guess even though it pertains to only surface tension. I added it to the ghost point variables for now.
Description
This PR makes the resolved phase surface tension model compatible with the 5-equation model and immersed boundaries.
Type of change
Scope
How Has This Been Tested?
Recovering a circle on an immersed boundary:
https://github.com/user-attachments/assets/2b5d5618-10e6-4e89-83bd-f1ffe1fecf9c
Recovering a sphere in 3D:
https://github.com/user-attachments/assets/d23164c3-205b-4998-aca1-6b1f1195ce6d
Laplace pressure jump:
https://github.com/user-attachments/assets/d63d03cf-fffa-4c30-9e44-0343d67279a7
Checklist
./mfc.sh format
before committing my code