Posts by author Yisheng

EOS project update

Ionization of the envelope

Equation of State

  • MESA-OPAL-SCVH eos covers region -11.0 ⇐ logRho ⇐ 3.64; 2.4 ⇐ logT ⇐ 7.8
  • I carved out the region -11.0 ⇐ logRho ⇐ 0; 2.4 ⇐ logT ⇐ 7.8
  • Then extended the EOS to lower temperature using ideal gas, with gamma = 5/3 and mu = 2.21 (0.69 + 0.29 * 4 + 0.02 * 18)

Result

  • All EOS tables are ready

Next Step

Perhaps future project?

  • If we want to run simulation with a lower ambient, we might need an EOS at lower density (-18 ⇐ logRho ⇐ -11)
  • To extend to lower density region (-18 ⇐ logRho ⇐ -11), we need to use PTEH eos, which is also part of MESA-eos.
  • However, the code of PTEH is different from OPAL-SCVH, so some work are needed to get the additional outputs (non-trivial)
  • Current python code I'm using to get the current EOS can be extended to implement the additional region (not too difficult)

EOS project update

Convection project update 05-05-2020: StarOnGrid

Clump

Convective instability

StarOnGrid simulation

Future step

  • email MESA (later this week or next week)
  • check the resolution issue
  • perhaps we are ready to run CE?

Convection project update 04-19-2020: Free Electron, test simulations

Convection project update 04-13-2020: clump test & Star test

Code

  • compilation magically works when I asked for an interactive session last week …
  • Not sure why but the code is now compiled and executable.

Clump

Star On Grid

  • Putting a single RGB star on the grid using Luke's profile
  • WinSCP stopped working this morning.. So everything on bluehive for now

Convection project update 03-30-2020

MESA profile

There seems to be a inconsistency between profile and EOS. Perhaps result from the way MESA interpolate EOS.

astrobear

  • modified EOS.f90 slightly to calculate X, Y and Z used in EOS. Astrobear uses atomic number fraction whereas MESA uses mass fraction
  • There is still a problem with running the code.. Not sure how to solve it.

Convection project update 03-16-2020: EOS test

Problem

When astrobear initialize, it does primitive form → conservative form and back, which can cause some problem.
The root of the problem is P(D, E) and E(D, P) have some troubles with self-consistency.
Technically speaking, P(D, T) and T(D, P); E(D, T) and T(D, E) both have this problem also, but they are directly invert of the inversion algorithm, so the numerical effects are much better.

https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03162020/How_EOS_tables_obtained.png

Most obvious consequence: energy is not conserved.

Test of self-consistency

Choose

-12 ⇐ log(rho) ⇐ -3
3 ⇐ log(pressure) ⇐ 8
0 ⇐ log(T) ⇐ 8

And discard everything outside our original table P(DT) and E(DT)

Flipping between P(D, E) and E(D, P) 200 times:
Input P0, calculate E0, then use E0 to find P1, then P1 to find E1 … Then so on and so forth, until the index reaches 200.
Plotted histogram the difference between P0 - P200 and E0 - E200

Similarly, do the same for P(D, T) and E(D, T)

PDE - EDP
Pressure https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03162020/Pressure_PDE_panta.png
Energy https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03162020/Energy_PDE_panta.png
PDT - TDP
Temperature https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03162020/Temperature_TDP_panta.png
Pressure https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03162020/Pressure_TDP_panta.png

Conclusion: PDE - EDP has a worse self-consistency then PDT - TDP.

Potential solutions

  • flip the EOS until reaching equilibrium
  • use one of PDE or EDP, and invert that EOS (this will give consistancy between PDE and EDP, but not the chain)

NOT Potential solutions

(Where I tried and failed)

  • changing the inversion interpolation routine to bicubic. This actually increases the numerical problem
  • Adding resolution to final table directly (cubic interpolate and sample better). In some sense, it will reduce numerical noise, but the improvement is minimal comparing to the memory used (double resolution increases file size by 4)

MESA profile

  • Tried to rewrite the get profile script in python, but encountering some understanding issue of the problem setup..

Convection project update 03-02-2020: clump test (3)

Convergence study

  • Upper: dx = 0.005
  • lower: dx = 0.01

Movies

  • subsonic: v = 1e7

https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03022020/res_fixed_grid_subsonic/table_eos_fixed_grid_subsonic.gif

  • supersonic: v = 1e8 (Mach 7)

https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03022020/res_fixed_grid_supersonic/table_eos_fixed_grid_supersonic.gif

Clump blowing up

  • Ambient density: 1e-8
  • Ambient pressure: 1e6
  • Clump density: 1e-7
  • Clump density: 1e9

Movie

  • Left: ideal gas
  • Right: table eos

https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03022020/res_steady_state/table_eos_fixed_grid_subsonic.gif

Clump blowing up (Energy)

Notebook: https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_03022020/CEE_convection_notebook.pdf
pg 4, 13, 25

Next step

  • What is the unit output of internal energy in chombo?
  • dx = 0.0025 is running. ETA Thursday (earliest).
  • Setup a star on grid?

Convection project update 02-24-2020: clump test (2)

Getting EOS Tables

Now existing tables

dx time/table
0.020 ~ 2 hr
0.010 ~ 8 hr
0.005 ~ 32 hr

Estimated run time = 32 hr * (dx_new/dx)2

  • It maybe impossible to get higher resolution tables since the run time is too long AND it takes up too much memory

Python error:

('slurmstepd: error: Job 11889544 exceeded memory limit (29770380 > 29360128), being killed
slurmstepd: error: Exceeded job memory limit
slurmstepd: error: *** JOB 11889544 ON bhc0009 CANCELLED AT 2020-02-22T19:16:42 ***

New Test Runs

run # EOS dx v_wind ~Cs
run 1 Table 0.010 1e7 0.7
run 2 Table 0.010 1e8 7
run 3 Table 0.005 1e7 0.7
run 4 Table 0.005 1e8 7
run 5 Ideal 1e7 0.7
run 6 Ideal 1e8 7
  • Subsonic

Upper: dx = 0.005; lower: dx = 0.010 https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_02242020/temp_subsonic/subsonic.gif

  • Supersonic

Upper: dx = 0.005; lower: dx = 0.010 https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_02242020/temp_supersonic/supersonic.gif

  • Ideal gas supersonic

https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_02242020/out_supersonic/ideal_supersonic.gif

Other Test Runs

Just a blub with

  • ambient pressure = 1e6
  • clump pressure = 1e8

Ideal gas: https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_02242020/ideal_steady/ideal_gas_steady.gif
Table EOS: https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_02242020/out_shock/table_eos_steady.gif

Convection project update 02-17-2020: clump test

Physical parameters

  • ambient density = 1e-8
  • ambient pressure = 1e6
  • clump density = 1e-7
  • clump pressure = 1e6
  • clump radius = 20
  • wind density = 1e-8
  • wind pressure = 1e6
  • wind velocity = 1e7 (stability test v = 0)
  • box side length > 200

Test 1: clump stability

Test 2: EOS resolution

running on 10 cores cell-update is a very very very rough approximate.. +- 1000

Run # EOS dlogx cell-update total run time
run 0 ideal ~ 14000 02:21:17
run 1 table 0.10 ~ 11000 03:27:45
run 2 table 0.05 ~ 11000 03:14:51
run 3 table 0.02 ~ 11000 02:56:45

Conclusion:

  • increasing table resolution doesn't increase run time
  • need higher resolution tables for the simulation to be physical

movie: https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_02172020/fig_dir_all/combined.gif

run 3 run 0
run 2 run 1

Thoughts

  • high resolution tables take looooong time to generate for dlogx = 0.01, it's taking ~ 8 hr to generate one Z (depending on core number)
  • Need a new interpolate function (square/cubic)?
  • Need a higher resolution table? How high?
  • Since we need high resolution table, how to setup? build a library?

EOS update

Good News

  1. Put EOS into Astrobear. The code is now compliable.
  2. Ran some tests. Astrobear successfully generated the first frame using new EOS, and agrees with Python result. (under some conditions …)

Bad News

  1. Once any dynamics starts, the EOS breaks down..

https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_02102020/Ideal_gas_eos_2_fig/

https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_02102020/Table_EOS_2_fig/


In physics.f90, Using pScale = 1d0 the first frame works fine, but using tempScale = 1d0 gives bad energy values.

Equation of State reference

I download all these papers & resources and put them on PAS server.

EOS papers

MESA EOS

OPAL:

SCVH:

PTEH:

HELM:

Other useful resources

Convection project update (EOS)

Physics of MESA EOS

pdf: https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_01272020/EOS.pdf
pptx: https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_01272020/EOS.pptx

Integrating EOS into AstroBEAR

  • Finished getting EOS from MESA; Inverted MESA EOS tables for astrobear
  • Starting to add modules into EOS.f90

Next Step

  • continue putting EOS into Astrobear & run test modules
  • calculate whether new EOS will naturally bring convection

Convection project update 09/30/2019

New Work

Interpolated the OPAL EOS with the provided interpolation function. The result agrees with MESA in the region applicable to OPAL EOS.

Pressure
https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_09302019/comparison2.png https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_09302019/comparison1.png Internal energy
https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_09302019/comparison3.png https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_09302019/comparison4.png

Next step

  1. Now I am using a bash script that coordinates a Python script and two fortran scripts to do the interpolation, which is very non-efficient (computation time ~5 hours). Modifying the fortran script to get a one-step function may save a lot of time (It looks like MESA only use less then 1 second to do the calculations).
  2. Inverting the tables to get other quantities as a function of density and internal energy.

Convection project update

Convection project

Update on plan

The OPAL EOS seems to go very deep into thermodynamics, which will take a long time before I figure every detail out. The (tentative) plan for precede this plan is list as follows

  1. Run MESA and understand the output: To use OPAL EOS, we need mentality information, which is now lacking.

    Success so far but still working on the understanding part.
    Remark: MESA took (almost) all my computer's remaining memory away

  2. Cross compare the OPAL EOS with MESA output by using and as the independent variables.
  3. Get a new initial condition for our simulation
  4. Put into ASTROBear

Meanwhile, I will try to understand the physics behind OPAL EOS.

Note update

Note > https://www.pas.rochester.edu/~yishengtu/research_files/CEE_gp_meeting_06032019/convection_in_CEE_06032019.pdf
Added section 3 on Statistical mechanics. In Roger's paper he mentioned that Grand Canonical ensemble is where the derivation start, so I'm trying to understand this part first

Convection project update

Project description

Phase 1: Putting OPAL Equation of state (EOS) into AstroBEAR
Phase 2: Run simulations will new EOS

OPAL EOS

History: Developed mainly by Forrest J. Rogers in 1990s, revised in 1996 and 2002

Includes

  1. non-relativistic Fermi-Dirac electrons
  2. classical ions
  3. all stages of ionization and excitation
  4. molecular hydrogen
  5. degenerate Columb correction
  6. quantum electron diffraction
  7. electron exchange
  8. pressure ionization
  9. terms arising from the so-called ladder diagrams of full quantum theory

Excludes

  1. pseudopotential method for going to higher order in electron-electro and electron-ion interaction (as far as in Rogers 1996)

Accurate to the order of

  1. Quantum diagrammatic procedure are used to calculate terms to order
  2. In the case of hydrogen, it agrees with -order correction

Online OPAL EOS table https://opalopacity.llnl.gov/opal.html

  1. 4 versions, the lastest is created in 2005 and updated in 2006.
  2. To determine which table we should use, we need Mentality and Hydrogen or Helium concentration or .
  3. Data ranges from to ; to
  4. Some interpolation code written in Fortran is also provided.

Ideal gas EOS

Assumes ideal, adiabatic and monoatomic gas

  1. adiabatic:
  2. Energy:

Comparision between Ideal gas EOS and OPAL EOS =

Red: OPAL
Green: Ideal

Pressure - density - temperature



Pressure - density - temperature - energy
X axis: density
Y axis: energy


By the way…
In run 143, frame 46 (reduSol)

min max
rho 1.483e-09 0.003275
T 2721.12 8.695e06
P 16007.5 1.0592e12

Next Step

  1. Understanding the difference between Ideal EOS and OPAL EOS

| Pressure comparison is much harder because pressure is a dependent variable in the table.

  1. Understand and use the Interpolation code
  2. Try to put them in AstroBEAR

Convection

Baltimore conference 04/21/2019

Ideas for improving simulation

  • Adding a tracer to see the exact layers structure of the envelope

CEE energy movie with various contours

Total Energy with contours

Absolute value of total energy; Density Contour; orbital plane
https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_11122018/Density%20contour/With_density_contour_En/Etot_gas_abs/

Normalized energy; Density Contour; orbital plane
https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_11122018/Density%20contour/With_density_contour_En/Etot_gas_normal/

Normalized energy; Absolute value of total energy Contour; orbital plane
https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_11122018/En_abs%20contour/Etot_gas_normal/

Absolute value of total energy; Density Contour; perpendicular to orbital plane, through particles
https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_11122018/Density%20contour/With_density_contour_En_else_plane/Etot_gas_abs/

Normalized energy; Density Contour; perpendicular to orbital plane, through particles
https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_11122018/Density%20contour/With_density_contour_En_else_plane/Etot_gas_normal/

Kinetic, Internal and potential with Contour

Kinetic energy; Density contour and E=0 Coutour; orbital plane

Internal energy; Density contour and E=0 Coutour; orbital plane

Kin+Int energy; Density contour and E=0 Coutour; orbital plane

Potential energy; Density contour and E=0 Coutour; orbital plane

Combined

CEE energy budget project - Slice from non-orbital plane

Edge-on through both particles

Density: Edge-on through both particles (full box): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_p1_edge_on_through_par_rho/D570.gif

Density: Edge-on through both particles (Zoom-in): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_p1_edge_on_through_par_rho/D150.gif

Normalized energy: Edge-on through both particles (full box): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_p1_edge_on_through_par_En/Etot_gas_normal/D570.gif

Normalized energy: Edge-on through both particles (Zoom-in): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_p1_edge_on_through_par_En/Etot_gas_normal/D150.gif

absolute value of energy: Edge-on through both particles (full box): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_p1_edge_on_through_par_En/Etot_gas_abs/D570.gif

absolute value of energy: Edge-on through both particles (Zoom-in): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_p1_edge_on_through_par_En/Etot_gas_abs/D150.gif

Parallel to edge-on through particles but center at center of box

Density: center of box parallel to Edge-on through both particles (full box): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_of_box_edge_on_through_par_rho/D570.gif

Density: center of box parallel to Edge-on through both particles (Zoom-in): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_of_box_edge_on_through_par_rho/D150.gif

Normalized energy: center of box parallel to Edge-on through both particles (full box): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_of_box_edge_on_through_par_En/Etot_gas_normal/D570.gif

Normalized energy: center of box parallel to Edge-on through both particles (Zoom-in): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_of_box_edge_on_through_par_En/Etot_gas_normal/D150.gif

absolute value of energy: center of box parallel to Edge-on through both particles (full box): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_of_box_edge_on_through_par_En/Etot_gas_abs/D570.gif

absolute value of energy: center of box parallel to Edge-on through both particles (Zoom-in): https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_09242018/Zoom_center_of_box_edge_on_through_par_En/Etot_gas_abs/D150.gif

Update CEE energy budget project

New Work

  • Energy of bound and unbounded mass
  • Unbounded Mass

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/bounded_mass_energy.png

  • Bounded Mass

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/unbounded_mass_energy.png

  • Mach number and speed of sound at particles
  • gas speed of sound

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/gas_cs_around_par.png

  • gas Mach number

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/gas_mach_around_par.png

  • particle Mach number in gas

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/par_mach.png

  • In orbit bound and unbounded mass
  • area we plot

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/D143_orbit_movie.gif

  • energy of gas inside orbit

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/in_orbit_bounded_mass.png

  • Unbounded mass of gas inside orbit

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/in_orbit_bounded_mass_energy.png

  • Energy movie
  • kinetic energy

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/Ekin_D200.gif

  • some frames

70:

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/D143_energy_distribution_plot_norm_frame_200_0070.png

71:

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/D143_energy_distribution_plot_norm_frame_200_0071.png

72:

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/D143_energy_distribution_plot_norm_frame_200_0072.png

73:

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/D143_energy_distribution_plot_norm_frame_200_0073.png

74:

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/D143_energy_distribution_plot_norm_frame_200_0074.png

75:

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/D143_energy_distribution_plot_norm_frame_200_0075.png

Next Step

  1. Comparing between reduced resolution data and high resolution dat
  2. re-simulate, without changing softening radius, around frame 73 to understand the blast wave at frame 73

3.1 Using first few frames to determine how stable the star is https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_08272018/First_few_frames_comparison_08272018.pdf OR 3.2 run another simulation for several dynamical time scale to ensure result.

  1. cooperate with Luke to prepare for paper

CEE energy budget project

New Work

  • Working closely with Luke to prepare for the paper. We are hoping to get a first draft by next Monday
  • Updates on energy note

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_07312018/Energy_note_07312018.pdf (most up-to-date)

The major updates for energy note are

  • High resolution data updates (section 6.1) Many thanks to Luke, Baowei and Jonathan!
  • Comparison between theoretical calculation and simulation values. (section 5.2 and 6.2)
  • Spacial energy plots added self-gravity of the gas
  • Plots about energy and mass within the orbital radius of the particles (section 5.4 and 5.6)
  • momentum (not very useful for now)
  • Updates on energy figure

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_07312018/Energy_note_on_main_figure_07312018.pdf

This is a separate note intended to analyze the energy figure (figure 2 in energy_note_06262018 and figure 2, 3, 4 in current version)

Some of the plots in this note are not up to date as the energy note. The table is also not as up-to-date as the energy note In this note, figure 1, 5, 6 compares results from our simulation to that of Ohlmann's.

  • Updates on energy movies. The movies last time excluded the gas-self gravity. This updated version includes this term.

This movie is the normalized energy movie. The normalization term is the larger term of the absolute value of potential energy and kinetic energy (include internal) https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_07312018/D143_energy_movie_Z.gif

This movie is the absolute value of the energy in log scale. I am still trying to figure out a better way to present the actual values of energy density but so far this is what I could think of ..

https://www.pas.rochester.edu/~yishengtu/CEE_gp_meeting_07312018/D143_energy_movie_Z_abs.gif

Next step

  • May want to justify the similarities between de-resolved data and full resolution data since some of the data could be hard to obtain with full-resolved data.
  • More work on the paper with Luke

Energy study in CEE simulation

New Work

Study on energy evolution and mass evolution during CEE simulation Energy movie. See note Energy_note_0626018

Nomalized energy movies

Energy Distribution X
Energy Distribution Y
Energy Distribution Z
Energy Distribution X normalized
Energy Distribution Y normalized
Energy Distribution Z normalized

Next Step

  1. Solve computational issue with original data set (Thanks to Baowei, Jonathan and Luke!)
  2. Re-simulate initial time-steps will be wanted due to the need to explain the energy jump between initial two frames
  3. Analytic solution to CEE and how different are they from simulation
  4. add mixing/convection into consideration; consider other factors (such as RLOF) that may effect energy budget.
  5. Consider Moment conservation and distribution, gaining insight to the simulation from another prospective.

Visit Test

Frame 75
Frame 248