lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
230 stars 285 forks source link

error; incomprehensible input for the field 'fluid_equation_of_state' #456

Closed pasq-cat closed 2 years ago

pasq-cat commented 2 years ago

Hi, i am was trying to add a new equation of state to class and i thought i had modified everything i needed but apparently i didn't. In order, in the ini file: 1) i commented Omega_fld #Omega_fld = 0 Omega_scf = 0 Omega_Lambda = 0.7 2) i changed the variables associated to the EoS ( made up values for now):

fluid_equation_of_state = LRS

w0_fld = -0.9
wa_fld = 0.1

in the background.c i added the 3 case LRS for
dw_over_da_fld , w_fld and *integral_fld

but when i try to run

./class lrs.ini i get:

Reading input parameters -> matched budget equations by adjusting Omega_fld = -0.009974

Error running input_init =>input_init(L:78) :error in input_read_from_file(&fc,ppr,pba,pth,ppt,ptr,ppm,phr,pfo,ple,psd,pop, errmsg); =>input_read_from_file(L:426) :error in input_read_parameters(pfc,ppr,pba,pth,ppt,ptr,ppm,phr,pfo,ple,psd,pop, errmsg); =>input_read_parameters(L:1531) :error in input_read_parameters_species(pfc,ppr,pba,pth,ppt, input_verbose, errmsg); =>input_read_parameters_species(L:2931) :error; incomprehensible input 'LRS' for the field 'fluid_equation_of_state'

is there anything else that i have to modify?

lesgourg commented 2 years ago

Hi @Rockdeldiablo, I see potentially two issues here: 1) if you use a DE fluid you probably want to set first Einstein's cosmological constant to zero. Then your input file should have 'Omega_Lambda=0' 2) if you want to use a new type of e.o.s called LRS, you should declare it first in include/background.h: enum equation_of_state {CLP,EDE,LRS};

pasq-cat commented 2 years ago

ah right , i completely missed them, especially Omega_lambda, but i keep getting the same error Reading input parameters -> matched budget equations by adjusting Omega_fld = 0.690026

Error running input_init =>input_init(L:78) :error in input_read_from_file(&fc,ppr,pba,pth,ppt,ptr,ppm,phr,pfo,ple,psd,pop, errmsg); =>input_read_from_file(L:426) :error in input_read_parameters(pfc,ppr,pba,pth,ppt,ptr,ppm,phr,pfo,ple,psd,pop, errmsg); =>input_read_parameters(L:1531) :error in input_read_parameters_species(pfc,ppr,pba,pth,ppt, input_verbose, errmsg); =>input_read_parameters_species(L:2931) :error; incomprehensible input 'LRS' for the field 'fluid_equation_of_state'

pasq-cat commented 2 years ago

looks like i was able to solve the issue , i had to update the input.c file.

lpttprnc commented 2 years ago

looks like i was able to solve the issue , i had to update the input.c file.

Hello @Rockdeldiablo I face the same problem. What update did you do to the input.c? thank you

pasq-cat commented 2 years ago

looks like i was able to solve the issue , i had to update the input.c file.

Hello @Rockdeldiablo I face the same problem. What update did you do to the input.c? thank you

you have to add a line like if ((strstr(string1,"LRS") != NULL) || (strstr(string1,"LRS") != NULL)) { pba->fluid_equation_of_state = LRS; } around line 3231 in input.c