-
Notifications
You must be signed in to change notification settings - Fork 10
Shared layer surface area function #33
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
base: main
Are you sure you want to change the base?
Conversation
… test for function and fixed function
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.
Looking really good! I'm still working through the math, but I had a couple requests that maybe could be addressed in the meantime?
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.
Looking good! I think we'll need to work a little on the partial derivative calculations. I added a comment, but we can talk more in person to work through the math if it would help.
…d surface_area funtion in modal/binned c code -- needs work
Co-authored-by: Matt Dawson <[email protected]>
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.
Getting closer! I think the calculation of the interface area might need to be modified a little. See what you think.
CONC_water / DENSITY_water + | ||
CONC_salt / DENSITY_salt ); // volume density of layer 3 (m3/m3) | ||
|
||
double eff_rad_expected = pow( ( 3.0 / 4.0 / 3.14159265359 * volume_density ), 1.0/3.0 ); |
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.
This looks like it is the surface area of the whole particle (based on the total volume of the particle). I think this should actually be the surface area of the second layer from the center (calculated by summing the total volume of the core and the middle layer)
To transfer mass between layers, the diffusion rxn will require diffusion fluxes multiplied by the inter-facial area shared between the layers. The mass transfer between layers is based on the flux equations described in Shiraiwa et al. (2012). This PR adds the surface area computation to the single particle aerosol representation.
This function, a prerequisite for the diffusion rxn, computes the surface area of the inter-facial layer considered. The diffusion rxn has not yet been added to the code. The function inputs include the aero_phase_idx_first and aero_phase_idx_second associated with the inner and outer layer phase considered in the mass transfer, respectively. These input phases are output from the adjacent_phases function, which checks if two phases are in adjacent layers and indicates associated phase pairs (index_pairs variable).
When multiple phases exist in the same layer, the surface area shared by the adjacent phases considered will scale according to volume occupied by a phases in their associated layers. The phase configuration chosen is known as "fractional volume overlap", meaning the surface area is multiplied by the fractional overlap
f_first * f_second * total_interface_surface_area
wheref_first = volume_phase_first / volume_total_layer_first
andf_second = volume_phase_second / volume_total_layer_second
.