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

zone boundaries with read in models #79

Closed
ssim opened this issue Feb 3, 2014 · 4 comments
Closed

zone boundaries with read in models #79

ssim opened this issue Feb 3, 2014 · 4 comments

Comments

@ssim
Copy link
Contributor

ssim commented Feb 3, 2014

Problems can arise if one tries to set the inner/outer boundary value for the velocity (in the model part of the yaml file) to be very close (exactly?) at the boundary of a zone as defined by a read in ascii file (containing the density profile). Problem, I think is that one can end up with zones that have no volume. Should fix this with a check that says we can only subdivide zones from the input file if the velocity boundary is sufficiently different (above some threshold difference, or something).

@unoebauer
Copy link
Contributor

FYI @wkerzendorf: @ssim - do you know the status of this? I vaguely remember that we encountered something like this during Talytha's tomography project. We should try to verify whether this issue still persists in the current version of Tardis or not before deciding about the fate of this issue.... I'll try to do that.

@unoebauer
Copy link
Contributor

Update - this issue is still relevant. I've just reproduced it with the following setup (see below). Since v_inner_boundary is equal to the second zone boundary in density.dat, a cell with zero volume is created and the plasma calculation fails - it is basically stalls in the electron density iteration, spitting out tons of warnings of the kind:

tardis.plasma.properties.ion_population - WARNING - n_electron iterations above 100 (611) - something is probably wrong

Setup

  • tardis.yml:
#New configuration for TARDIS based on YAML
#IMPORTANT any pure floats need to have a +/- after the e e.g. 2e+5
#Hopefully pyyaml will fix this soon.
---
#Currently only simple1d is allowed
tardis_config_version: v1.0
supernova:
    luminosity_requested: 9.44 log_lsun
    time_explosion: 13 day

atom_data: kurucz_cd23_chianti_H_He.h5


model:

    structure:
        type: file
        filename: density.dat
        filetype: simple_ascii
        v_inner_boundary: 11675 km/s
        v_outer_boundary: 20000 km/s

    abundances:
        type: file
        filename: abund_be.dat
        filetype: simple_ascii

plasma:
    disable_electron_scattering: no
    ionization: nebular
    excitation: dilute-lte
    #radiative_rates_type - currently supported are lte, nebular and detailed
    radiative_rates_type: dilute-blackbody
    #line interaction type - currently supported are scatter, downbranch and macroatom
    line_interaction_type: scatter


montecarlo:
    seed: 23111963
    no_of_packets : 4.0e+3
    iterations: 20

    black_body_sampling:
        start: 1 angstrom
        stop: 1000000 angstrom
        num: 1.e+6
    last_no_of_packets: 1.e+4
    no_of_virtual_packets: 3

    convergence_criteria:
        type: specific
        damping_constant: 1.0
        threshold: 0.05
        fraction: 0.8
        hold: 3
        t_inner:
            damping_constant: 1.0


spectrum:
    start : 500 angstrom
    stop : 20000 angstrom
    num: 10000

  • abund_be.dat:
# index Z=1 - Z=30
 0  0.00000000e+00  7.78711238e-16  1.75705015e-24  0.00000000e+00  2.01618168e-21  1.20283254e-06  3.68195664e-14  1.69451192e-05  1.90114989e-20  4.77375683e-10  4.32004476e-11  1.76994333e-05  1.10684582e-09  5.56058295e-01  2.11650572e-06  2.77388724e-01  1.38348836e-06  4.21330728e-02  3.95700428e-06  2.92287290e-02  8.74098237e-10  1.20726386e-05  4.74024111e-07  1.03882675e-03  1.06957249e-04  5.97486723e-02  2.31551820e-02  1.10856829e-02  3.59376664e-09  1.53433408e-09
 1  0.00000000e+00  1.03764014e-15  2.97032082e-24  0.00000000e+00  3.40742359e-21  2.47805353e-06  7.86310480e-14  6.71373572e-05  7.33409541e-20  1.87527917e-09  1.90416625e-10  2.12906044e-05  1.71414442e-09  5.90768509e-01  2.86961446e-06  2.73426350e-01  3.06037997e-06  3.85983808e-02  8.23944920e-06  2.48849233e-02  2.05131415e-09  1.16611647e-05  3.48728933e-07  1.01815208e-03  7.76701114e-05  5.73257840e-02  7.69612712e-03  6.08700521e-03  4.63129245e-09  1.95090837e-09
 2  0.00000000e+00  4.29280198e-16  8.41239580e-24  0.00000000e+00  1.14251376e-20  1.30986163e-05  6.60051055e-12  1.00396724e-02  1.24028991e-17  2.48408538e-07  1.03738111e-08  4.59086200e-05  3.26234449e-07  5.93131657e-01  2.11621057e-04  2.78472752e-01  2.75990685e-04  4.18642447e-02  4.06660083e-04  2.51325275e-02  2.32206675e-08  4.96462909e-05  4.94955938e-07  1.19829838e-03  2.71918894e-04  4.60776785e-02  1.88954021e-04  2.61826524e-03  2.50024014e-09  4.01952362e-10
 3  0.00000000e+00  6.43810901e-17  2.18789897e-23  0.00000000e+00  3.23873079e-20  1.17597478e-05  2.70721898e-11  4.45908184e-02  5.94348753e-17  1.17277190e-06  1.02002536e-08  1.35547249e-04  1.83012051e-06  5.70761776e-01  4.21244464e-04  2.77745471e-01  5.25693748e-04  4.72144924e-02  7.37223261e-04  2.52591262e-02  7.18321946e-08  1.36151129e-04  1.06433936e-06  1.23248032e-03  3.07311372e-04  2.92351038e-02  1.54613931e-04  1.52703403e-03  2.99541335e-09  5.69002109e-10
 4  0.00000000e+00  6.86038905e-19  1.06709990e-22  0.00000000e+00  4.96627815e-19  5.92394603e-06  1.74020401e-10  2.44105895e-01  6.20280963e-16  7.92257460e-06  6.64764506e-09  6.03385375e-04  1.22975197e-05  4.41178052e-01  6.71792724e-04  2.34213000e-01  8.00829263e-04  5.10767422e-02  1.04160349e-03  2.12995744e-02  2.38160464e-07  2.93474445e-04  2.50619715e-06  5.58902537e-04  6.31016099e-05  3.84619128e-03  2.61219972e-05  1.92437684e-04  7.19116865e-10  1.81851458e-10
 5  0.00000000e+00  8.14361600e-21  3.18891234e-20  0.00000000e+00  2.66639544e-16  2.86664384e-06  1.95416432e-09  6.40408442e-01  1.47408528e-10  2.77474464e-05  7.63106123e-08  8.31486945e-02  3.42524734e-03  1.62949651e-01  1.94898330e-03  9.52665499e-02  3.05261478e-04  1.18469392e-02  3.41651062e-05  6.20596037e-04  3.29860682e-07  1.05568159e-05  6.33885392e-07  3.07709144e-06  8.35402866e-08  9.68373044e-08  1.19562934e-10  1.50504355e-10  3.49166887e-15  3.70403999e-15
 6  0.00000000e+00  2.18679277e-17  5.67936001e-20  0.00000000e+00  6.52639122e-16  1.90508831e-04  4.10495033e-09  6.49469097e-01  1.38206484e-09  7.33046421e-05  9.01356477e-06  9.97988355e-02  6.98282037e-03  1.41812265e-01  2.46451232e-03  8.63822998e-02  2.85103213e-04  1.20450637e-02  2.71175353e-05  4.54175045e-04  6.31968971e-07  4.37217923e-06  3.41499947e-07  5.11634837e-07  1.54198428e-08  5.39459366e-09  1.13634244e-11  5.94800121e-12  3.06884737e-16  2.64929923e-16
 7  0.00000000e+00  1.71906380e-15  1.25146105e-21  0.00000000e+00  3.25252260e-16  1.43574192e-03  6.59391715e-09  6.47527141e-01  1.71608225e-09  4.48019848e-03  7.20830776e-05  1.12770609e-01  9.22999369e-03  1.36086195e-01  3.48604982e-03  7.35886188e-02  1.61889427e-03  9.29277927e-03  1.56960618e-04  2.52359725e-04  4.59684631e-07  1.70109469e-06  1.21362633e-07  8.18461727e-08  2.21915490e-09  3.21064951e-10  1.78705916e-12  1.66871098e-13  3.70941116e-17  3.61506815e-18
 8  0.00000000e+00  2.59807773e-13  8.90580122e-16  0.00000000e+00  6.74454109e-11  2.54457436e-01  3.59961679e-05  5.31122795e-01  5.23848775e-08  8.65341334e-02  4.47290524e-03  6.27798714e-02  4.69352040e-03  4.17519336e-02  1.24111986e-03  1.16933953e-02  4.63871237e-04  7.32377082e-04  1.43038456e-05  6.25700470e-06  1.54706813e-08  1.55816139e-08  4.87891762e-10  6.92178665e-11  7.05370616e-13  2.10349750e-14  6.16747791e-17  1.16950726e-18  2.37841437e-22  0.00000000e+00
 9  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
 10  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
 11  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
 12  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
 13  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
 14  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
 15  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
 16  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
 17  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
 18  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
 19  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  4.74982799e-01  0.00000000e+00  5.00024001e-01  0.00000000e+00  2.49931997e-02  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00
  • density.dat:
1.300000e+01 day
# index velocity (km/s) density (g/cm^3)
 0  1.12250000e+04  8.60500569e-14
 1  1.16750000e+04  7.26346482e-14
 2  1.21250000e+04  6.11430585e-14
 3  1.25750000e+04  5.36332537e-14
 4  1.30250000e+04  5.21688860e-14
 5  1.34750000e+04  5.95305021e-14
 6  1.39250000e+04  5.21403438e-14
 7  1.43750000e+04  4.13063797e-14
 8  1.48250000e+04  5.06088660e-14
 9  1.52750000e+04  4.26829924e-14
 10  1.57250000e+04  1.34341056e-14
 11  1.61750000e+04  6.98042861e-15
 12  1.66250000e+04  4.70268809e-15
 13  1.70750000e+04  3.25559969e-15
 14  1.75250000e+04  3.13873346e-15
 15  1.79750000e+04  2.52163502e-15
 16  1.84250000e+04  2.17757037e-15
 17  1.88750000e+04  2.15842908e-15
 18  1.93250000e+04  1.69304859e-15
 19  1.97750000e+04  1.48418705e-15

@unoebauer
Copy link
Contributor

Started a PR (#450) to address this issue.

ssim added a commit that referenced this issue Dec 10, 2015
Checking for zero-volume cells: Fixes issue #79
@unoebauer
Copy link
Contributor

PR #450 has been merged - closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants