Skip to content

Add photoevaporation modules#4

Merged
rbooth200 merged 75 commits intorbooth200:masterfrom
AndrewSellek:master
Nov 9, 2020
Merged

Add photoevaporation modules#4
rbooth200 merged 75 commits intorbooth200:masterfrom
AndrewSellek:master

Conversation

@AndrewSellek
Copy link
Copy Markdown
Contributor

Additional external and internal photoevaporation modules and edits to existing modules to work with these. Upgrade of the dust evolution to use the prescription from Dipierro et al. 18 for the dust-gas relative velocity.

Andrew Sellek and others added 30 commits November 23, 2018 01:00
… old timescale method which will work for high constant mass loss rates and may be useful for testing. Also has the first attempt at weighting for the optically thin regime. Jupiter Mass added to constants for convenience. Photoevaporative timescale added to driver to avoid situations where more mass than exists can be lost in the timestep. Extra features on disc designed to account for half empty cells and ambient UV field.
…0. Implementation of this, along with using integrated mass. Tracking additional disc properties
…entrainment working. Work to tackle problems of over-rapid radial drift and diverging dust mass fractions. Currently setting the minimum size to zero again, which avoids the drift problem, but we still add a check that it is drifting slower than the ffree-fall velocity or terminal velocity. Attempt to model pressure gradient commented out. To solve the diverging densities, we reset the dust mass fraction to 1 should we exceed it, though there is a commented out attempt to diagnose the pproblem and do better.
…d ffmpeg into the python script. Updated run_many to iterate over several, use nice and run in the background, waiting for batches to finish before moving onto the next.
…ct of this on the drift timescale and nan errors. Changed file saving to logarithmic spacing in line with the plotting. Considered whether to entrain dust when truncating - commented out for now
… scripts and save more regularly. Estimating depletion times and fate fractions.
…so that other things can call it more easily.
@AndrewSellek
Copy link
Copy Markdown
Contributor Author

I think I've made the structural changes you suggested.
The internal photoevaporation module now has one class for a photoevaporating disc. Each prescription (Owen, Picogna, EUV) has its own child class with separate methods for Primordial and InnerHole discs. The class has an attribute to know which is active and checks whether to switch over itself when called.
Many of the actual calculations for the history module I have left in their own module since e.g. there may be other things that would like to know the total mass of the disc and want to call that. But rather than these being passed a variable to tell them whether to save to history, they always return a value. "History" calls these and then stores the value in its own attributes. Various instructions to restart, log values and save have been moved into this module from the run_model.py script. Additionally I added tracking for the cumulative amount of gas removed by a wind due to external photoevaporation, as well as the dust. The history module acts just like the plotting option in terms of the json, with the ability to switch it off entirely, or specific times.
[Nb in my version of run_model, if the times are set to [0] then it inherits the main output times. To focus the outputs sensibly I often used log-spaced times. If this is set (arrange=log rather than arrange=explicit) it will override the times provided for plotting and history (with warning) so that all 3 coincide. In practice I never use plotting.]

@rbooth200 rbooth200 merged commit 3187ffa into rbooth200:master Nov 9, 2020
@rbooth200
Copy link
Copy Markdown
Owner

Thanks for this, it looks great. I need to make some changes to get the FRIED grid to work with my install scripts (which have changed in the last couple of years). Once I've done that, I'll let you know

@AndrewSellek
Copy link
Copy Markdown
Contributor Author

AndrewSellek commented Nov 9, 2020 via email

@rbooth200
Copy link
Copy Markdown
Owner

Do you have time to chat today about the viscous velocity implementation?

@rbooth200
Copy link
Copy Markdown
Owner

It's ok, I think its fine

@AndrewSellek
Copy link
Copy Markdown
Contributor Author

AndrewSellek commented Nov 9, 2020 via email

@rbooth200
Copy link
Copy Markdown
Owner

Can you try installing my latest version and checking that your internal / external PE results look sensible?

@rbooth200
Copy link
Copy Markdown
Owner

The only siginificant changes I've made are:

  • h_edge is replaced by an approximation (average / extrapolation)
  • I've update v_visc to be the center of mass velocity (because I think that's what is normally wanted)

@AndrewSellek
Copy link
Copy Markdown
Contributor Author

AndrewSellek commented Nov 9, 2020 via email

@AndrewSellek
Copy link
Copy Markdown
Contributor Author

AndrewSellek commented Nov 9, 2020 via email

@rbooth200
Copy link
Copy Markdown
Owner

I think multiplication is correct. The torques (forces) are the same but the total mass moved is more, so I get a lower velocity. The 1+eps should correct that

@AndrewSellek
Copy link
Copy Markdown
Contributor Author

AndrewSellek commented Nov 9, 2020 via email

@AndrewSellek
Copy link
Copy Markdown
Contributor Author

AndrewSellek commented Nov 10, 2020 via email

@rbooth200
Copy link
Copy Markdown
Owner

I see my mistake now, and agree with you that 1+eps should be replaced with 1 / (1-eps). Do you want to make that change.

Thanks for fixing bugs, too.

@AndrewSellek
Copy link
Copy Markdown
Contributor Author

AndrewSellek commented Nov 10, 2020 via email

@rbooth200
Copy link
Copy Markdown
Owner

It might help, was the small number (1e-300) needed in your original implementation?

@rbooth200
Copy link
Copy Markdown
Owner

You could just use eps_g as already defined in the code instead of 1-eps.sum()

@AndrewSellek
Copy link
Copy Markdown
Contributor Author

AndrewSellek commented Nov 10, 2020 via email

@AndrewSellek
Copy link
Copy Markdown
Contributor Author

AndrewSellek commented Nov 10, 2020 via email

@rbooth200
Copy link
Copy Markdown
Owner

That should work since its essentially what you were doing before.

@AndrewSellek
Copy link
Copy Markdown
Contributor Author

AndrewSellek commented Nov 11, 2020 via email

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.

2 participants