Unable to use ZERO_R inner boundary condition

Bug/problem reports for any of the GYRE executables (gyre_ad, gyre_nad, etc)
Post Reply
joelongjiamian
Posts: 11
Joined: Wed Nov 20, 2019 10:39 am

Unable to use ZERO_R inner boundary condition

Post by joelongjiamian » Thu Mar 19, 2020 9:52 pm

Am I correct in understanding that the ZERO_R boundary condition is not intended to be used with evolutionary models that already specify a central point? I get errors with GYRE 5.2 in either case (just different errors). With the central point included, I obtain an assertion error:

Code: Select all

 ASSERT 'cx%pt_i%x /= 0._WP' failed at line 123 <gyre_ad_bound:ad_bound_t_>:
 Boundary condition invalid for x == 0
On the other hand, with the central point excised (with the models I'm working with), a crash (SIGFPE) happens:

Code: Select all

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0  0x7f536c311d6f in ???
#1  0x4c6420 in ???
#2  0x4c9be7 in ???
#3  0x52bd7a in ???
#4  0x404eff in ???
#5  0x404ae6 in ???
#6  0x7f536c2fd022 in ???
#7  0x404b1d in ???
#8  0xffffffffffffffff in ???
input file follows:

Code: Select all

&model
    model_type = 'EVOL'
    file = 'profile172.data.GYRE'
    file_format = 'MESA'
    add_center = .false.
    ! file_format = 'FGONG'
    ! data_format = '(1P5E16.9,x)'
/

&constants
    G_GRAVITY = 6.67408d-8
/


&mode
    l = 1          ! Harmonic degree
/


&osc
    outer_bound = 'JCD'
    inner_bound = 'ZERO_R'
    variables_set = 'JCD'
    inertia_norm = 'BOTH'
    !reduce_order = .FALSE.
    !nonadiabatic = .true.
/

&num
    diff_scheme = 'COLLOC_GL4'
/

&scan
    grid_type = 'LINEAR'
    freq_min_units = 'UHZ'
    freq_max_units = 'UHZ'
    freq_min = 500
    freq_max = 1200
    n_freq = 1000
/

&grid
    alpha_osc = 20            ! At least alpha points per oscillatory wavelength
    alpha_exp = 20            ! At least alpha points per exponential 'wavelength'
    n_inner = 60                ! At least n points in the evanescent region
/

&nad_output
    summary_file = 'profile172-freqs-1-gamma-nad.dat'
    summary_file_format = 'TXT'
    summary_item_list = 'l,n_pg,n_p,n_g,freq,E_norm,W'
    freq_units = 'UHZ'
    mode_file_format = 'TXT' 
    mode_template = 'mode-nad.%J.txt'
    mode_item_list = 'M_star,R_star,l,n_pg,freq,W,dW_dx,x,xi_r,rho,P,T,Gamma_1,delta,nabla_ad,prop_type,eul_P,eul_rho,lag_rho,lag_P,lag_S,lag_T'
/

&ad_output
    summary_file = 'profile172-freqs-1-gamma.dat'
    summary_file_format = 'TXT'
    summary_item_list = 'l,n_pg,n_p,n_g,freq,E_norm'
    freq_units = 'UHZ'
    mode_file_format = 'TXT' 
    mode_template = 'mode.%J.txt'
    mode_item_list = 'M_star,R_star,l,n_pg,freq,x,xi_r,rho,P,T,Gamma_1,prop_type,eul_P,eul_rho,lag_rho,lag_P'
/
I've placed a sample MESA model at http://hyad.es/sendfile/payloads/profile172.data.GYRE

User avatar
rhtownsend
Site Admin
Posts: 397
Joined: Sun Mar 31, 2013 4:22 pm

Re: Unable to use ZERO_R inner boundary condition

Post by rhtownsend » Thu Mar 19, 2020 10:13 pm

joelongjiamian wrote:
Thu Mar 19, 2020 9:52 pm
Am I correct in understanding that the ZERO_R boundary condition is not intended to be used with evolutionary models that already specify a central point? I get errors with GYRE 5.2 in either case (just different errors). With the central point included, I obtain an assertion error:

Code: Select all

 ASSERT 'cx%pt_i%x /= 0._WP' failed at line 123 <gyre_ad_bound:ad_bound_t_>:
 Boundary condition invalid for x == 0
Yes, that's right -- ZERO_R only when there is no central point.

On the other hand, with the central point excised (with the models I'm working with), a crash (SIGFPE) happens:

Code: Select all

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0  0x7f536c311d6f in ???
#1  0x4c6420 in ???
#2  0x4c9be7 in ???
#3  0x52bd7a in ???
#4  0x404eff in ???
#5  0x404ae6 in ???
#6  0x7f536c2fd022 in ???
#7  0x404b1d in ???
#8  0xffffffffffffffff in ???
input file follows:

Code: Select all

&model
    model_type = 'EVOL'
    file = 'profile172.data.GYRE'
    file_format = 'MESA'
    add_center = .false.
    ! file_format = 'FGONG'
    ! data_format = '(1P5E16.9,x)'
/

&constants
    G_GRAVITY = 6.67408d-8
/


&mode
    l = 1          ! Harmonic degree
/


&osc
    outer_bound = 'JCD'
    inner_bound = 'ZERO_R'
    variables_set = 'JCD'
    inertia_norm = 'BOTH'
    !reduce_order = .FALSE.
    !nonadiabatic = .true.
/

&num
    diff_scheme = 'COLLOC_GL4'
/

&scan
    grid_type = 'LINEAR'
    freq_min_units = 'UHZ'
    freq_max_units = 'UHZ'
    freq_min = 500
    freq_max = 1200
    n_freq = 1000
/

&grid
    alpha_osc = 20            ! At least alpha points per oscillatory wavelength
    alpha_exp = 20            ! At least alpha points per exponential 'wavelength'
    n_inner = 60                ! At least n points in the evanescent region
/

&nad_output
    summary_file = 'profile172-freqs-1-gamma-nad.dat'
    summary_file_format = 'TXT'
    summary_item_list = 'l,n_pg,n_p,n_g,freq,E_norm,W'
    freq_units = 'UHZ'
    mode_file_format = 'TXT' 
    mode_template = 'mode-nad.%J.txt'
    mode_item_list = 'M_star,R_star,l,n_pg,freq,W,dW_dx,x,xi_r,rho,P,T,Gamma_1,delta,nabla_ad,prop_type,eul_P,eul_rho,lag_rho,lag_P,lag_S,lag_T'
/

&ad_output
    summary_file = 'profile172-freqs-1-gamma.dat'
    summary_file_format = 'TXT'
    summary_item_list = 'l,n_pg,n_p,n_g,freq,E_norm'
    freq_units = 'UHZ'
    mode_file_format = 'TXT' 
    mode_template = 'mode.%J.txt'
    mode_item_list = 'M_star,R_star,l,n_pg,freq,x,xi_r,rho,P,T,Gamma_1,prop_type,eul_P,eul_rho,lag_rho,lag_P'
/
I've placed a sample MESA model at http://hyad.es/sendfile/payloads/profile172.data.GYRE
I'll have to look into this. On a related note -- did you apply the patch I posted? Did it work?

cheers,

Rich

Post Reply