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

Add P3 Sink Terms #381

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add P3 Sink Terms #381

wants to merge 1 commit into from

Conversation

anastasia-popova
Copy link
Contributor

@anastasia-popova anastasia-popova commented Apr 23, 2024

Purpose

This PR aims to add the necessary collision sink terms to the P3 Scheme

To-do

Content


  • I have read and checked the items on the review checklist.

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 99.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.09%. Comparing base (f30e789) to head (63b479b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #381      +/-   ##
==========================================
+ Coverage   96.96%   97.09%   +0.12%     
==========================================
  Files          37       37              
  Lines        1452     1550      +98     
==========================================
+ Hits         1408     1505      +97     
- Misses         44       45       +1     
Components Coverage Δ
src 98.89% <99.00%> (+<0.01%) ⬆️
ext 69.79% <ø> (ø)

@anastasia-popova anastasia-popova changed the title Add P3 Scheme Sink Terms Add P3 Collision Sink Terms Apr 23, 2024
@anastasia-popova anastasia-popova force-pushed the ap/processes branch 4 times, most recently from 04f63fd to 0812e19 Compare April 23, 2024 21:17
@anastasia-popova anastasia-popova marked this pull request as ready for review April 23, 2024 21:44
@anastasia-popova anastasia-popova force-pushed the ap/processes branch 3 times, most recently from 697ec8d to ba00147 Compare April 24, 2024 21:25
@trontrytel
Copy link
Member

I think we need to make the integrals more complicated. This is because we want to use the 2M Seifert and Beheng scheme for the cloud and rain part. That means we should integrate overt the assumed 2M distributions for cloud and rain (instead of assuming continuous q). And for precipitation we need to consider the fact that rain has a terminal velocity of its own (see for example eq 25 in 1M docs.

I wrote down some notes, trying to keep the notation the same as in SB and P3 scheme docs pages:

PXL_20240424_230008608

@trontrytel
Copy link
Member

In the 1M scheme we take the velocity difference out of the integral by approximating it by the mass weighted velocity difference. Thats one way of making this simpler. The alternative is to swicth to numerical integrals, and keep the velocities in the integral

@trontrytel
Copy link
Member

Also, in the writeup, I'm not sure how the a(x, D) term would actually look for the different cross section regimes in P3. Do you have any ideas?

src/P3Scheme.jl Outdated Show resolved Hide resolved
src/P3Scheme.jl Outdated Show resolved Hide resolved
src/P3Scheme.jl Outdated Show resolved Hide resolved
src/P3Scheme.jl Outdated Show resolved Hide resolved
src/P3Scheme.jl Outdated Show resolved Hide resolved
two colliding particles
"""
function a(D1::FT, D2::FT) where {FT}
# TODO make this more accurate for non-spherical particles
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any ideas what to assume for the other particle regimes?

Copy link
Contributor Author

@anastasia-popova anastasia-popova May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not have anything concrete. I was thinking finding some D' value for the regimes where the area is not in the form of D^2 such that D'^2 = D^sigma and then using D' in this calculation but I am not convinced that this would give us anything helpful.

src/P3Scheme.jl Outdated Show resolved Hide resolved
src/P3Scheme.jl Outdated Show resolved Hide resolved
src/P3Scheme.jl Outdated Show resolved Hide resolved
@anastasia-popova anastasia-popova force-pushed the ap/processes branch 2 times, most recently from 1879151 to 3d9edef Compare May 20, 2024 17:10
@anastasia-popova anastasia-popova changed the title Add P3 Collision Sink Terms Add P3 Sink Terms May 21, 2024
@anastasia-popova anastasia-popova force-pushed the ap/processes branch 2 times, most recently from aff318f to e3788cc Compare May 22, 2024 18:46
docs/src/P3Scheme.md Outdated Show resolved Hide resolved
docs/src/P3Scheme.md Outdated Show resolved Hide resolved
docs/src/P3Scheme.md Outdated Show resolved Hide resolved
Melting rates are calculated through the following equation:

```math
\frac{dq}{dt} = \frac{1}{2 \rho_a} \int_{0}^{\infty} \! \frac{dm(D)}{dt} N'(D) \mathrm{d}D
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be

Suggested change
\frac{dq}{dt} = \frac{1}{2 \rho_a} \int_{0}^{\infty} \! \frac{dm(D)}{dt} N'(D) \mathrm{d}D
\frac{dq}{dt} = \int_{0}^{\infty} \! \frac{dm(D)}{dt} N'(D) \mathrm{d}D

because in the P3 scheme q is in kg/m3 we don't need to divide by air density. Maybe it would be good to write the P3 variables as rho_air q. I think this way the notation bewteen P3 and the 1M and 2M schemes would actually be consistent and we could remove one of the todos

@trontrytel
Copy link
Member

I can help revive this branch after #403 is merged. Lets see if we can make this work with limiters, or if we have to do without

@anastasia-popova anastasia-popova force-pushed the ap/processes branch 3 times, most recently from c46e993 to d8fb670 Compare June 7, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add collisions/coalescence parameterizations
2 participants