Skip to content

Add effective surface tension - #229

Open
Jim-Xu wants to merge 6 commits into
compdyn:masterfrom
Jim-Xu:org_film
Open

Jim-Xu wants to merge 6 commits into
compdyn:masterfrom
Jim-Xu:org_film

Conversation

@Jim-Xu

@Jim-Xu Jim-Xu commented Jul 16, 2026

Copy link
Copy Markdown

Summary

This PR adds an effective surface tension (EST) treatment for CCN activation as an alternative to the existing constant surface tension assumption. Previously, Köhler-based CCN activation in PartMC assumed a fixed surface tension (typically that of pure water), which does not capture the surface-tension lowering caused by surface-active organics (surfactants). The new method estimates a composition-dependent effective surface tension per particle, so surfactant effects on droplet activation are represented explicitly.

Reference

The EST formulation and its evaluation follow:

Xu, X., Curtis, J. H., Yao, Y., Liu, Y., West, M., & Riemer, N. (2026). Role of liquid–liquid phase separation-induced surface tension changes in cloud droplet activation. Aerosol Science and Technology. https://doi.org/10.1080/02786826.2026.2631789

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 8.02920% with 126 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.46%. Comparing base (636ac09) to head (36c06a2).

Files with missing lines Patch % Lines
src/aero_particle.F90 0.00% 120 Missing ⚠️
src/aero_state.F90 0.00% 4 Missing ⚠️
src/aero_data.F90 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #229      +/-   ##
==========================================
- Coverage   77.40%   76.46%   -0.95%     
==========================================
  Files          55       55              
  Lines        9436     9571     +135     
==========================================
+ Hits         7304     7318      +14     
- Misses       2132     2253     +121     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jcurtis2
jcurtis2 self-requested a review July 22, 2026 21:24
@Jim-Xu

Jim-Xu commented Jul 28, 2026

Copy link
Copy Markdown
Author

I've pushed the updates addressing the CAMP issue. The CI checks are showing "Action required" — could you approve the workflow runs when you get a chance? Thanks!

aero_particle_crit_diameter_est started Newton far from the root and, for
organic-film particles whose Kohler curve S(D) is double-peaked, converged to
the wrong (outer) root -- a larger critical diameter and lower critical
supersaturation -- or diverged to NaN. Replace the far-start Newton with a
coarse logarithmic scan for the global maximum of S(D) plus a bracketed Newton
(rtsafe) refinement. The EST physics is unchanged; only the root finding.

Also address code-review items in the org_film branch:
- set eff_surf_eng on the hydrophobic (kappa < 1e-30) early return
- guard vol(0) for absent species, 0/0 in surf_eng_organic, and v_sol <= 0
- retire the obsolete d >= dry_diam assert; repurpose the remaining warning
  to flag a maximum above the scan range
- read aero_sigma with must_be_present=.false. for backward compatibility
- use util.F90 sphere-geometry helpers (add sphere_diam2vol)
- follow the i_spec/n_spec loop-variable convention
- precompute per-particle soluble sums (aero_particle_soluble_sums) so the scan
  avoids repeated species-name lookups (~10x faster post-processing)

ctest passes 14/14.

This branch has not been deployed

No deployments
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.

1 participant