Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #528
    Alankar Dutta
    Participant

    What are the different columns in treecoolfile given in the data folder? Can I use any other cooling function say for a different metallicity generated by Cloudy?

    #530

    The treecool file are equilibrium photoionization and photoheating rates, an up to date table is e.g. presented in https://arxiv.org/pdf/1801.04931.pdf.
    This only includes a very simple Hydrogen and Helium network, see https://arxiv.org/pdf/astro-ph/9509107.pdf.
    More sophisticated cooling routines need to be implemented seperately, a simple table is not enough.

    #543
    Alankar Dutta
    Participant

    Thanks a lot Rainer! That helps a lot. Sorry for the super late reply. Can you suggest a way that I can implement a very simple cooling function to be read from a file (say a text file with two columns Temperature and Cooling rate Lambda)?
    I was actually playing around with some custom cooling functions for some idealized simulations and wish to test them out on Arepo.

    #546

    Here a brief guide. If you have further questions, let me know.

    In cooling.c, function DoCooling calls CoolingRateFromU, which returns the
    cooling rate given a specific thermal energy, density and an electron number density.

    In CoolingRateFromU (line 449, cooling.c), a conversion from specific thermal energy
    to temperature is called, and then the function CoolingRate, which takes log(temperature), gas density and electron number densitiy as an input (line 508 in cooling.c).

    If you want to change the cooling function, you want to replace this CoolingRate
    function call with a call to your own cooling rate.

    Note that this is called for every cell separately.

    If, for some reason, you want to get an array of densities, temperatues and electron number densities (and other possible properties), you need to trace back the cooling call to the functions cooling_only (cooling.c, line 803) and cooling_and_starformation (sfr_eEOS.c) and gather your data there, where you have the respective loop over all active gas cells. However, my impression is that you don’t need to do this in your case.

    #547
    Alankar Dutta
    Participant

    Thanks a lot! This is really helpful. I’ll try to put do the necessary edits to implement some custom cooling function. I’ll get back to you if I’m stuck with something.

    • This reply was modified 4 months, 1 week ago by Alankar Dutta. Reason: small edit
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.