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

Bug running relaxed star in Minkowski metric #333

Closed
msha0023 opened this issue Oct 9, 2022 · 5 comments · Fixed by #413
Closed

Bug running relaxed star in Minkowski metric #333

msha0023 opened this issue Oct 9, 2022 · 5 comments · Fixed by #413
Labels
bug Something isn't working

Comments

@msha0023
Copy link
Contributor

msha0023 commented Oct 9, 2022

Code fails when trying to evolve the star in isolation after the relaxation procedure.

Steps followed :-

~/phantom/scripts/writemake.sh grstar > Makefile (in Minkowski)
make
make setup
./phantomsetup star.setup
./phantom star.in

Error

WARNING! cons2primsolver [in step_extern_sph_gr (a)]: enthalpy did not converge on particle 2
 WARNING! cons2primsolver [in step_extern_sph_gr (a)]: enthalpy did not converge on particle 759
 WARNING! cons2primsolver [in step_extern_sph_gr (b)]: enthalpy did not converge on particle 2
 WARNING! cons2primsolver [in step_extern_sph_gr (b)]: enthalpy did not converge on particle 759
 WARNING! cons2primsolver [in step_extern_sph_gr (a)]: enthalpy did not converge on particle 9
 WARNING! cons2primsolver [in step_extern_sph_gr (a)]: enthalpy did not converge on particle 764
 WARNING! cons2primsolver [in step_extern_sph_gr (b)]: enthalpy did not converge on particle 9
 (buffering remaining warnings... enthalpy did not converge on particle 764) 
 WARNING! cons2primsolver [in step_extern_sph_gr (a)]: enthalpy did not converge on particle 252
 WARNING! cons2primsolver [in step_extern_sph_gr (a)]: enthalpy did not converge on particle 501

 FATAL ERROR! maketree: NaN in particle position, likely caused by NaN in force on particle 2: x =        NaN

@msha0023
Copy link
Contributor Author

Update: This issue does not happen when SYSTEM=gfortran is used for the compiler.

@Shigaharuki3012
Copy link

Update: This issue does not happen when SYSTEM=gfortran is used for the compiler.

Hi,I am also a user of PHANTOM.
When I used grstar setup,a different error from yours appeard even I have changed the compiler from ifort to gfortran.So have you successfully run the whole simulation after using gfortran compiler?
(I couldn't even pass the relax-star-process before I run the whole simulation(That is,for me ,tde.in).

@msha0023
Copy link
Contributor Author

msha0023 commented Apr 7, 2023

Update: This issue does not happen when SYSTEM=gfortran is used for the compiler.

Hi,I am also a user of PHANTOM. When I used grstar setup,a different error from yours appeard even I have changed the compiler from ifort to gfortran.So have you successfully run the whole simulation after using gfortran compiler? (I couldn't even pass the relax-star-process before I run the whole simulation(That is,for me ,tde.in).

Hi, I can get the simulations to work for both compilers. The way to run grstar is to use-> ~/phantom/scripts/writemake.sh grstar>Makefile, followed by make setup and make. Then use ./phantomsetup star, select the model and you can then relax a star. The file to use for tde.in is the star_00000.tmp. If you want to use GR in your TDE sims, then use make setup GR=yes METRIC=kerr and make moddump GR=yes METRIC=kerr. Then you can run ./phantommodump star_00000.tmp tde 0.0 . This will write tde.tdeparams and then tde.in which you can use for the run.

@Shigaharuki3012
Copy link

./phantomsetup star

Thank you for your reply.In fact when I use grstar setup all kinds of errors appear,even I had followed the steps.
But when I manually add GR=yes in the config.F90 in the ~/phantom/main folder then everything goes well but the units are in chaos(For example,c=686 but we need G=c=1 in GR=yes case)
So did you change anything in phantom?In fact these errors have bothered me for a long time...(Maybe it's because I made some mistakes in the command line...)
My commands were:

cd tde
 ~/phantom/scripts/writemake.sh grstar > Makefile
make 
make setup
./phantomsetup star     #Then I use polytrope setup and automatically-relax-star.Others are default
./phantomsetup star .setup

when in the last step(relax star),error appeared like :

ERROR! get_u0 in rho2dens: 1/sqrt(-v_mu v^mu) ---> non-negative: v_mu v^mu
 ERROR! get_u0 in rho2dens: 1/sqrt(-v_mu v^mu) ---> non-negative: v_mu v^mu
 ERROR! get_u0 in prim2cons: 1/sqrt(-v_mu v^mu) ---> non-negative: v_mu v^mu
 pmom =                     NaN                     NaN                     NaN
  pmom =                     NaN                     NaN                     NaN
  pmom =                     NaN                     NaN                     NaN
  rho* =   1.13353353642459
  en   =                     NaN
 FATAL ERROR! cons2prim: could not solve rootfinding on particle 6277
  rho* =   1.82053973411935
  en   =                     NaN

More details of some other error are shown in the discusion with Mr Price in #402.

@danieljprice
Copy link
Owner

I think some of this error is because we had ireconav = 1 by default in the .in file, while using reconstruction on the shock viscosity in GR is a very experimental feature.

Hence I have switched ireconav=-1 in #413 which should resolve the remaining issues here

Note also that since #413 it is no longer necessary to use grstar and moddump, one can simply use SETUP=grtde as a one-step relax-and-go procedure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants