Crust DFT module questions

Hi,

I’m Federico Nola, PhD student from Italy.

I’m learning how to use MUSES CE to perform simulations for my PhD thesis. The problem is that I’m probably not understanding how to run correctly Crust DFT module with Lepton module, and so also with the others.

I already read the documentation multiple times, but maybe I missed something.

If anyone will help me, I’ll be extremely thankful.

FN

Hi Federico,

Did you check out this tutorial? Example 3 has a configuration for the Crust-DFT → Lepton workflow that might be what you need.

Or are you trying to use the Gooey? There you will need to connect the input files, so checking out the full tutorial beforehand might be useful.

We also have a few example Jupyter notebooks. You can check them out here.

I’d love to help, but could you share a bit more on which step you are getting stuck on? That’ll make it easier for us to answer.

Thank you for replying.

I’m using the Gooey. I already read pretty much everything, trying to follow the tutorials.

I have two problems:

  • Crust-DFT module requires an input file I probably did’t understand what it is
  • There’s only one output file, so I did’t understand how to link Crust-DFT with Lepton

Also, I tried to use Gooey to generate a NS model with Chiral (+ lepton) and CMB (+ lepton), but the synthesis module (connected well) is always giving me problems.

Thank you again for helping me.

Sharing the workflow config will make it easier to troubleshoot. The Gooey offers a config preview text box, or the job results page also displays the config YAML text. Paste this into a formatted code block in your post

    ```yaml
    Copied config text
    ```  

Federico,

For crust-DFT, in the Connect modules section, select Uploads, and click on Select an upload - you’ll see a list of files, and some of them have a path/public_data/eos_tables/du21/*. Most of these are inputs for crust-DFT with different EOSs. Try out the ones starting with large_mmax or fid.

To connect with Lepton, add the crust-DFT module, and then on Connect modules, select the only Crust-DFT output you’ll see for the Lepton input_eos.

For us to help with Synthesis, please follow Andrew’s advice and paste the config you used.

processes:
- name: chiral_eft-1
  config:
    eos_grid:
      density_end: 0.32
      density_step: 0.032
      density_start: 0.032
      isospin_asymmetry_end: 1
      isospin_asymmetry_step: 1
      isospin_asymmetry_start: 0
    run_name: Test 1 - 450
    output_options:
      output_format: csv
      output_precision: 12
      include_output_flavor: true
      include_output_lepton: true
      include_output_stable: true
      include_output_saturation_properties: false
    calculation_options:
      n_threads: 8
      use_multithreading: false
      use_first_order_eos: true
      use_second_order_eos: true
      use_three_nucleon_forces: true
      use_free_energy_ansatz_fit: true
      use_first_order_self_energy: true
      use_quadratic_asymmetry_expansion: false
    physical_parameters:
      gA: 1.29
      fpi: 92.4
      alpha: 0.0072967957
      gamma: 0
      hbarc: 197.327
      proton_mass: 938.272
      neutron_mass: 939.5653
      average_pion_mass: 138.039
      charged_pion_mass: 139.5702
      neutral_pion_mass: 134.9766
      average_nucleon_mass: 938.9182
    chiraleft_parameters:
      c_lecs:
        c_1: -0.81
        c_2: 3.28
        c_3: -3.4
        c_4: 3.4
      d_lecs:
        d_3: -3.27
        d_5: 0.45
        d_12: 3.06
        d_1415: -5.65
      contact_lsj: true
      contacts_LO:
        contact_LO_nn_1: -0.1548085
        contact_LO_nn_2: 0
        contact_LO_np_1: -0.15524
        contact_LO_np_2: -0.142925
        contact_LO_pp_1: -0.15445
        contact_LO_pp_2: 0
      contacts_NLO:
        contact_NLO_1: 2.15
        contact_NLO_2: 1.24
        contact_NLO_3: 0.25
        contact_NLO_4: -0.688
        contact_NLO_5: 0.61
        contact_NLO_6: 0.57
        contact_NLO_7: -0.6425
      contacts_N3LO:
        contact_N3LO_1: -4.25
        contact_N3LO_2: -16.4
        contact_N3LO_3: 0.1
        contact_N3LO_4: 2.1
        contact_N3LO_5: 3.65
        contact_N3LO_6: 12
        contact_N3LO_7: 1.55
        contact_N3LO_8: -0.8
        contact_N3LO_9: 2.65
        contact_N3LO_10: 4.63
        contact_N3LO_11: -2.42
        contact_N3LO_12: -0.37
        contact_N3LO_13: 1.892
        contact_N3LO_14: -0.61
        contact_N3LO_15: 5.76
      cutoff_exponent: 3
      cutoff_scale_MeV: 450
      cutoff_exponent_LO: 4
      fitted_parameter_set: none
      three_nucleon_forces:
        c_D: -0.24
        c_E: -0.106
        cutoff_scale_MeV: 700
  module: chiral_eft
- name: lepton-1
  pipes:
    input_eos:
      label: ChEFT_Output_Lepton
      module: chiral_eft
      process: chiral_eft-1
  config:
    input:
      grid_variable: auto
    global:
      verbose: 2
      use_lepton_eos: false
      lepton_fraction: 0
      check_eos_stability: true
      use_beta_equilibrium: true
      use_charge_neutrality: false
      remove_negative_pressure: true
    output:
      output_hdf5: false
      output_compOSE: false
      output_derivatives: false
      output_particle_properties: false
      output_flavor_equilibration: false
    solver:
      method: levenbergMarquardt
      linear_solver: denseQR
      function_tolerance: 1.0e-10
      gradient_tolerance: 1.0e-12
      max_num_iterations: 1000
      parameter_tolerance: 1.0e-10
      convergence_threshold: 1.0e-07
      use_nonmonotonic_steps: true
    particles:
      use_tau: false
      use_muon: true
      use_electron: true
      use_tau_neutrino: false
      use_muon_neutrino: false
      use_extra_particles: false
      use_electron_neutrino: false
    derivatives:
      method: gsl
      finite_difference:
        precision: 1
        step_size: 0.005
        step_type: relative
    compOSE_options:
      baryon_density_points: 301
      baryon_density_spacing: linear
      charge_fraction_points: 60
      charge_fraction_spacing: linear
    lepton_eos_parameters:
      electron_cp_step: 0
      temperature_step: 0
      electron_cp_final: 0
      temperature_final: 0
      electron_cp_initial: 0
      temperature_initial: 0
      electron_neutrino_cp_step: 0
      electron_neutrino_cp_final: 0
      electron_neutrino_cp_initial: 0
    flavor_equilibration_options:
      reinterpolate_eos: false
      baryon_density_points: 301
      charge_fraction_points: 60
    multidimensional_interpolator:
      number_of_points: 100
      use_multidimensional_interpolator: false
  module: lepton
- name: crust_dft-1
  config:
    np: 4
    set:
      verbose: 0
      Ye_grid_spec: 70,0.01*(i+1)
      nB_grid_spec: 301,10^(i*0.04-12)*2.0
    ext_guess: true
    select_model: 470 738 0.5 13.0 62.4 32.8 0.9
    output_format: CSV
    generate_table: false
  inputs:
    EOS_table:
      path: /public_data/eos_tables/du21/fid_450_2_6_22.o2
      type: upload
      uuid: a4f8be0f-57b6-4fe4-b460-3ef5720ead7b
      label: EOS_table
      checksum: e39eb584e5587b74a90c74f9648f8e5f
  module: crust_dft
- name: lepton-2
  pipes:
    input_eos:
      label: crust_dft_output
      module: crust_dft
      process: crust_dft-1
  config:
    input:
      grid_variable: auto
    global:
      verbose: 2
      use_lepton_eos: false
      lepton_fraction: 0
      check_eos_stability: true
      use_beta_equilibrium: true
      use_charge_neutrality: false
      remove_negative_pressure: true
    output:
      output_hdf5: false
      output_compOSE: false
      output_derivatives: false
      output_particle_properties: false
      output_flavor_equilibration: false
    solver:
      method: levenbergMarquardt
      linear_solver: denseQR
      function_tolerance: 1.0e-10
      gradient_tolerance: 1.0e-12
      max_num_iterations: 1000
      parameter_tolerance: 1.0e-10
      convergence_threshold: 1.0e-07
      use_nonmonotonic_steps: true
    particles:
      use_tau: false
      use_muon: true
      use_electron: true
      use_tau_neutrino: false
      use_muon_neutrino: false
      use_extra_particles: false
      use_electron_neutrino: false
    derivatives:
      method: gsl
      finite_difference:
        precision: 1
        step_size: 0.005
        step_type: relative
    compOSE_options:
      baryon_density_points: 301
      baryon_density_spacing: linear
      charge_fraction_points: 60
      charge_fraction_spacing: linear
    lepton_eos_parameters:
      electron_cp_step: 0
      temperature_step: 0
      electron_cp_final: 0
      temperature_final: 0
      electron_cp_initial: 0
      temperature_initial: 0
      electron_neutrino_cp_step: 0
      electron_neutrino_cp_final: 0
      electron_neutrino_cp_initial: 0
    flavor_equilibration_options:
      reinterpolate_eos: false
      baryon_density_points: 301
      charge_fraction_points: 60
    multidimensional_interpolator:
      number_of_points: 100
      use_multidimensional_interpolator: false
  module: lepton
- name: cmf_solver-1
  config:
    physical_parameters:
      f_K: 122
      f_pi: 93.3000031
      hbarc: 197.3269804
      d_betaQCD: 0.0606060606
      vacuum_masses:
        mass0: 150
        kaon_vacuum_mass: 498
        pion_vacuum_mass: 139
        Delta_vacuum_mass: 1232
        Omega_vacuum_mass: 1691
        Sigma_vacuum_mass: 1202
        Lambda_vacuum_mass: 1115
        nucleon_vacuum_mass: 937.242981
        Sigma_star_vacuum_mass: 1385
      quark_bare_masses:
        up_quark_bare_mass: 5
        down_quark_bare_mass: 5
        strange_quark_bare_mass: 150
      mean_field_vacuum_masses:
        phi_mean_field_vacuum_mass: 1019
        rho_mean_field_vacuum_mass: 761.062988
        omega_mean_field_vacuum_mass: 780.562988
      scalar_nucleon_couplings:
        gN_zeta: 0.467039
        alpha_DX: 0.350848362262
        gN_sigma: -10.5668
      vector_nucleon_couplings:
        g_4: 38.9
        gN_phi: 0
        gN_rho: 4.03
        gN_omega: 11.9
      quark_to_fields_couplings:
        gqd_phi: 0
        gqd_rho: 0
        gqs_phi: 0
        gqs_rho: 0
        gqu_phi: 0
        gqu_rho: 0
        gqd_zeta: 0
        gqs_zeta: -3
        gqu_zeta: 0
        gqd_delta: 0
        gqd_omega: 0
        gqd_sigma: -3
        gqs_delta: 0
        gqs_omega: 0
        gqs_sigma: 0
        gqu_delta: 0
        gqu_omega: 0
        gqu_sigma: -3
        gQ_Phi_order: 500
      explicit_symmetry_breaking:
        m_1: 0
        m_2: 0
        m_3D: 1.25
        m_3H: 0
        V_Delta: 0
      scalar_mean_field_equation:
        k_0: 2.3732188
        k_1: 1.39999998
        k_2: -5.54911336
        k_3: -2.65241888
      Phi_order_optical_potential:
        T0: 200
        a_1: -0.001443
        a_3: -0.396
        T0_gauge: 270
      chi_mean_field_vacuum_value: 401.933763
      baryon_to_Phi_field_coupling:
        gB_Phi_order: 1500
    computational_parameters:
      options:
        use_octet: true
        use_quarks: true
        use_decuplet: true
        use_hyperons: true
        use_Phi_order: true
        use_ideal_gas: false
        use_pure_glue: false
        vector_potential: 4
        baryon_mass_coupling: 1
        use_default_vector_couplings: true
      variables:
        mean_fields_and_Phi_field:
          phi0_end: 0
          rho0_end: 1
          phi0_step: 13.333
          rho0_step: 10
          zeta0_end: -40
          delta0_end: 1
          omega0_end: 100
          phi0_begin: -40
          rho0_begin: 0
          sigma0_end: -10
          zeta0_step: 23.333
          delta0_step: 10
          omega0_step: 33.333
          sigma0_step: 30
          zeta0_begin: -110
          delta0_begin: 0
          omega0_begin: 0
          sigma0_begin: -100
          Phi_order0_end: 0.9999
          Phi_order0_step: 0.333
          Phi_order0_begin: 0
        chemical_optical_potentials:
          muB_end: 1900
          muQ_end: 10
          muS_end: 10
          muB_step: 2
          muQ_step: 100
          muS_step: 100
          muB_begin: 900
          muQ_begin: 0
          muS_begin: 0
      output_files:
        output_debug: false
        output_Lepton: true
        output_format: CSV
        output_particle_properties: true
        output_flavor_equilibration: true
      constant_fields:
        use_constant_phi_mean_field: false
        use_constant_rho_mean_field: false
        use_constant_Phi_order_field: false
        use_constant_zeta_mean_field: false
        use_constant_delta_mean_field: false
        use_constant_omega_mean_field: false
        use_constant_sigma_mean_field: false
      solution_resolution: 1.0e-15
      maximum_for_residues: 0.0001
  module: cmf_solver
- name: lepton-3
  pipes:
    input_eos:
      label: CMF_for_Lepton_quarks_only
      module: cmf_solver
      process: cmf_solver-1
  config:
    input:
      grid_variable: auto
    global:
      verbose: 2
      use_lepton_eos: false
      lepton_fraction: 0
      check_eos_stability: true
      use_beta_equilibrium: true
      use_charge_neutrality: false
      remove_negative_pressure: true
    output:
      output_hdf5: false
      output_compOSE: false
      output_derivatives: false
      output_particle_properties: false
      output_flavor_equilibration: false
    solver:
      method: levenbergMarquardt
      linear_solver: denseQR
      function_tolerance: 1.0e-10
      gradient_tolerance: 1.0e-12
      max_num_iterations: 1000
      parameter_tolerance: 1.0e-10
      convergence_threshold: 1.0e-07
      use_nonmonotonic_steps: true
    particles:
      use_tau: false
      use_muon: true
      use_electron: true
      use_tau_neutrino: false
      use_muon_neutrino: false
      use_extra_particles: false
      use_electron_neutrino: false
    derivatives:
      method: gsl
      finite_difference:
        precision: 1
        step_size: 0.005
        step_type: relative
    compOSE_options:
      baryon_density_points: 301
      baryon_density_spacing: linear
      charge_fraction_points: 60
      charge_fraction_spacing: linear
    lepton_eos_parameters:
      electron_cp_step: 0
      temperature_step: 0
      electron_cp_final: 0
      temperature_final: 0
      electron_cp_initial: 0
      temperature_initial: 0
      electron_neutrino_cp_step: 0
      electron_neutrino_cp_final: 0
      electron_neutrino_cp_initial: 0
    flavor_equilibration_options:
      reinterpolate_eos: false
      baryon_density_points: 301
      charge_fraction_points: 60
    multidimensional_interpolator:
      number_of_points: 100
      use_multidimensional_interpolator: false
  module: lepton
- name: lepton-4
  pipes:
    input_eos:
      label: CMF_for_Lepton_baryons_only
      module: cmf_solver
      process: cmf_solver-1
  config:
    input:
      grid_variable: auto
    global:
      verbose: 2
      use_lepton_eos: false
      lepton_fraction: 0
      check_eos_stability: true
      use_beta_equilibrium: true
      use_charge_neutrality: false
      remove_negative_pressure: true
    output:
      output_hdf5: false
      output_compOSE: false
      output_derivatives: false
      output_particle_properties: false
      output_flavor_equilibration: false
    solver:
      method: levenbergMarquardt
      linear_solver: denseQR
      function_tolerance: 1.0e-10
      gradient_tolerance: 1.0e-12
      max_num_iterations: 1000
      parameter_tolerance: 1.0e-10
      convergence_threshold: 1.0e-07
      use_nonmonotonic_steps: true
    particles:
      use_tau: false
      use_muon: true
      use_electron: true
      use_tau_neutrino: false
      use_muon_neutrino: false
      use_extra_particles: false
      use_electron_neutrino: false
    derivatives:
      method: gsl
      finite_difference:
        precision: 1
        step_size: 0.005
        step_type: relative
    compOSE_options:
      baryon_density_points: 301
      baryon_density_spacing: linear
      charge_fraction_points: 60
      charge_fraction_spacing: linear
    lepton_eos_parameters:
      electron_cp_step: 0
      temperature_step: 0
      electron_cp_final: 0
      temperature_final: 0
      electron_cp_initial: 0
      temperature_initial: 0
      electron_neutrino_cp_step: 0
      electron_neutrino_cp_final: 0
      electron_neutrino_cp_initial: 0
    flavor_equilibration_options:
      reinterpolate_eos: false
      baryon_density_points: 301
      charge_fraction_points: 60
    multidimensional_interpolator:
      number_of_points: 100
      use_multidimensional_interpolator: false
  module: lepton
- name: synthesis-1
  pipes:
    model1_BetaEq_eos:
      label: eos_beta_equilibrium
      module: lepton
      process: lepton-1
    model2_BetaEq_eos:
      label: eos_beta_equilibrium
      module: lepton
      process: lepton-2
  config:
    global:
      verbose: 0
      synthesis_type: attach
      check_eos_causality: false
      check_eos_stability: false
    output:
      output_hdf5: false
      output_compOSE: false
      output_derivatives: false
      output_particle_properties: false
    solver:
      method: levenbergMarquardt
      linear_solver: denseQR
      function_tolerance: 1.0e-10
      gradient_tolerance: 1.0e-12
      max_num_iterations: 1000
      parameter_tolerance: 1.0e-10
      convergence_threshold: 1.0e-07
      use_nonmonotonic_steps: true
    derivatives:
      method: gsl
      finite_difference:
        precision: 1
        step_size: 0.005
        step_type: relative
    mixed_phase:
      number_of_points: 20
    attach_method:
      add_gap: false
      attach_value: 1300
      attach_variable: baryon_chemical_potential
      attach_lower_value: 900
      attach_upper_value: 1500
    compOSE_options:
      baryon_density_points: 301
      baryon_density_spacing: linear
      charge_fraction_points: 60
      charge_fraction_spacing: linear
    interpolation_method:
      Gamma: 0
      epsilon: 0.001
      exp_power: 2
      x_variable: baryon_density
      y_variable: pressure
      number_of_points: 150
      end_interpolation: 0
      start_interpolation: 0
      x_variable_midpoint: 0
      limit_from_endpoints: true
      auto_profile_from_bounds: false
      use_thermodynamic_consistency: true
  module: synthesis
- name: synthesis-2
  pipes:
    model1_BetaEq_eos:
      label: eos_beta_equilibrium
      module: lepton
      process: lepton-3
    model2_BetaEq_eos:
      label: eos_beta_equilibrium
      module: lepton
      process: lepton-4
  config:
    global:
      verbose: 0
      synthesis_type: attach
      check_eos_causality: false
      check_eos_stability: false
    output:
      output_hdf5: false
      output_compOSE: false
      output_derivatives: false
      output_particle_properties: false
    solver:
      method: levenbergMarquardt
      linear_solver: denseQR
      function_tolerance: 1.0e-10
      gradient_tolerance: 1.0e-12
      max_num_iterations: 1000
      parameter_tolerance: 1.0e-10
      convergence_threshold: 1.0e-07
      use_nonmonotonic_steps: true
    derivatives:
      method: gsl
      finite_difference:
        precision: 1
        step_size: 0.005
        step_type: relative
    mixed_phase:
      number_of_points: 20
    attach_method:
      add_gap: false
      attach_value: 1300
      attach_variable: baryon_chemical_potential
      attach_lower_value: 900
      attach_upper_value: 1500
    compOSE_options:
      baryon_density_points: 301
      baryon_density_spacing: linear
      charge_fraction_points: 60
      charge_fraction_spacing: linear
    interpolation_method:
      Gamma: 0
      epsilon: 0.001
      exp_power: 2
      x_variable: baryon_density
      y_variable: pressure
      number_of_points: 150
      end_interpolation: 0
      start_interpolation: 0
      x_variable_midpoint: 0
      limit_from_endpoints: true
      auto_profile_from_bounds: false
      use_thermodynamic_consistency: true
  module: synthesis
- name: synthesis-3
  pipes:
    model1_BetaEq_eos:
      label: eos
      module: synthesis
      process: synthesis-1
    model2_BetaEq_eos:
      label: eos
      module: synthesis
      process: synthesis-2
  config:
    global:
      verbose: 0
      synthesis_type: attach
      check_eos_causality: false
      check_eos_stability: false
    output:
      output_hdf5: false
      output_compOSE: false
      output_derivatives: false
      output_particle_properties: false
    solver:
      method: levenbergMarquardt
      linear_solver: denseQR
      function_tolerance: 1.0e-10
      gradient_tolerance: 1.0e-12
      max_num_iterations: 1000
      parameter_tolerance: 1.0e-10
      convergence_threshold: 1.0e-07
      use_nonmonotonic_steps: true
    derivatives:
      method: gsl
      finite_difference:
        precision: 1
        step_size: 0.005
        step_type: relative
    mixed_phase:
      number_of_points: 20
    attach_method:
      add_gap: false
      attach_value: 1300
      attach_variable: baryon_chemical_potential
      attach_lower_value: 900
      attach_upper_value: 1500
    compOSE_options:
      baryon_density_points: 301
      baryon_density_spacing: linear
      charge_fraction_points: 60
      charge_fraction_spacing: linear
    interpolation_method:
      Gamma: 0
      epsilon: 0.001
      exp_power: 2
      x_variable: baryon_density
      y_variable: pressure
      number_of_points: 150
      end_interpolation: 0
      start_interpolation: 0
      x_variable_midpoint: 0
      limit_from_endpoints: true
      auto_profile_from_bounds: false
      use_thermodynamic_consistency: true
  module: synthesis
- name: qlimr-1
  pipes:
    eos:
      label: eos
      module: synthesis
      process: synthesis-3
  config:
    inputs:
      wb11_c: 0.1
      A22_int: 1
      R_start: 0.0004
      eos_name: eos
      final_epsilon: '.inf'
      single_epsilon: 700
      initial_epsilon: 250
      resolution_in_NS_M: 0.05
      resolution_in_NS_R: 0.2
    options:
      eps_sequence: true
      output_format: csv
      stable_branch: true
    outputs:
      compute_all: true
      compute_love: false
      compute_inertia: false
      local_functions: false
      compute_quadrupole: false
      compute_mass_and_radius_correction: false
  module: qlimr
components:
- name: gooey-chain
  type: chain
  sequence:
  - chiral_eft-1
  - lepton-1
  - crust_dft-1
  - lepton-2
  - cmf_solver-1
  - lepton-3
  - lepton-4
  - synthesis-1
  - synthesis-2
  - synthesis-3
  - qlimr-1

I solved the problem I had with Crust-DFT. This is the workflow I tried to use now, here’s the failure message:
Error in module synthesis: Internal failure. Code: 400, Message: Error executing attach.Error reading EoS files. One or both files are empty. Exiting.

Also, when I try to read the beta_equilibrium_eos.csv I get a page saying Internal Server Error

EDIT: I ran some checks using mini workflows (ChEFT+lepton, Crust-DFT+lepton and CMF+lepton), and then downloaded the output files. The server error occurs for the beta_equilibrium_eos.csv file from the CMF+lepton mini workflow, even if there were no failure messages. I was able to open and download the beta_equilibrium_eos.csv file foe ChEFT+lepton and Crust-DFT+lepton without problems.

I ran the same workflow and reproduced your results.

The physics experts are away this week and next at a workshop or conference, unfortunately, but I have a suspicion that the error might be in the Lepton configuration. There is a generate_table: false in crust_dft-1 that may be omitting the production of the file you need. I’m trying it with that set to true.

Side note: You are using a chain structure, and while it is valid and should not be causing the failure, there is a more efficient structure that supports parallelism for faster execution. See this example for a pattern to follow.

This is a bug in the CE we should fix. It will look better for our open source project if :memo: you create the issue instead of me. If you prefer not to do that, no worries.

Following the data flow from your pipe definitions, I constructed an optimized workflow structure to minimize runtime. This fails much quicker than your linear workflow :laughing:

components:
  - type: chain
    name: chain-chiral_eft
    sequence:
      - chiral_eft-1
      - lepton-1
  - type: chain
    name: chain-crust_dft
    sequence:
      - crust_dft-1
      - lepton-2
  - type: group
    name: group-cmf_solver-leptons
    group:
      - lepton-3
      - lepton-4
  - type: chain
    name: chain-cmf_solver-leptons-synthesis
    sequence:
      - cmf_solver-1
      - group-cmf_solver-leptons
      - synthesis-2
  - type: group
    name: group-chiral-crust-leptons
    group:
      - chain-chiral_eft
      - chain-crust_dft
  - type: chain
    name: chain-chiral-crust-leptons-synthesis
    sequence:
      - group-chiral-crust-leptons
      - synthesis-1
  - type: group
    name: group-eos-synthesis
    group:
      - chain-chiral-crust-leptons-synthesis
      - chain-cmf_solver-leptons-synthesis
  - type: chain
    name: chain-synthesis-qlimr
    sequence:
      - group-eos-synthesis
      - synthesis-3
      - qlimr-1

Aside from parallelism, another benefit of using a workflow structure like this is that you can easily comment out components when debugging. For example, I commented out everything except the chiral_eft-lepton chain for one job, and then launched a second job including only the crust_dft-lepton chain, and a third job with the cmf-lepton-synthesis chain. These three jobs are running in parallel making it faster to determine exactly where failures occur, and hopefully make it clearly why.

The lepton module logs from the chiral_eft-lepton chain workflow show messages indicating convergence:

  "Starting equilibrium calculation at",
  "T, nB=  0 MeV, 0.256fm-3",
  "Initial guess: -40.1751 1",
  "Ceres Solver Report: Iterations: 20, Initial cost: 4.955574e-01, Final cost: 7.138277e-21, Termination: CONVERGENCE",
  "",
  "Convergence.",

The lepton module logs for the failed cmf-leptons workflow show failure to converge:


  "Starting equilibrium calculation at",
  "T, nB=  0 MeV, 1.49869fm-3",
  "Initial guess: 0 1",
  "Ceres Solver Report: Iterations: 0, Initial cost: -1.000000e+00, Final cost: -1.000000e+00, Termination: FAILURE",
  "",
  "No convergence.",

CrustDFT is taking forever so I don’t know what will happen to its lepton calculation.

Thank you for the advice.

I just created the issue, I’m waiting for it to be fixed.

Thank you again.

Is it possible to see some results for neutron stars observables calculated with MUSES CE? Some test results, articles o whatever, since it’s now impossible to generate results by myself because of the Internal Server Error for lepton module for CMF

Federico, I’m happy it worked for Crust-DFT and chiral EFT. I believe your CMF run is failing because you do not have a sufficient grid in the Q-direction to compute beta-equilibrium. Could you try again with

        chemical_optical_potentials:
          muB_end: 1900
          muQ_end: 0
          muB_step: 5
          muQ_step: 2
          muB_begin: 950
          muQ_begin: -400

Let me know if that works :slight_smile:

You can see some results from the CE in this paper.

With the parameters you suggested me I get this error:
Error in module lepton: Internal failure. Code: 406, Message: Error calculating Beta Equilibrium. The interpolated EoS is not stable. Exiting.

Well, that’s an improvement :slight_smile: . Your current issue is that Lepton is computing beta-equilibrium at fixed muB, and at low muB, varying muQ might give you a stable phase either on the low or the high nB range of the liquid-gas phase transition.

What this means is that the root solver is looking for one equilibrium point, but because we fed the interpolator two phases, you don’t know which one it’ll pick as the solution at each muB. This can give you an unstable EOS.

One way around is to compute the equilibrium in density, which you can do by setting in the Lepton config:

    multidimensional_interpolator:
      use_multidimensional_interpolator: true

Or you can start at a higher muB_begin.

Please let me know if this fails, as this is the approach I have been taking to bypass the issue.

I made it work, thank you.

Now the next problem: QLIMR module.

I uploaded the eos.csv obtained by synthesis module, merging all the pieces together. Now I’m getting this message:

Error in module qlimr: Internal failure. Code: 500, Message: Internal error

I already tried to change some parameters but I’m not solving it.

Also, while checking all the output files, I noticed that there are columns that are zero, Temperature included: What precautions should I take to obtain the temperature profile?

@federico.nola when you encounter a vague error like “Code: 500, Message: Internal error”, look through the execution logs to find more helpful information. For example, in your job 48af3cbe-f551-40ed-8e6a-fd8c8ac51e12 (which I can only see because I am an admin; most of the community members who can help you will not have access to that), the QLIMR log.json file shows:

[
  "Job \"48af3cbe-f551-40ed-8e6a-fd8c8ac51e12\": Celery task \"d6fe52d9-8aba-46ad-ac90-4ee347b2dafb\" triggered for task \"qlimr-1\" running module \"qlimr\".",
  "\u001b[1;31mError: \u001b[0mThe provided EoS is not monotonically increasing, and execution has been stopped.",
  "",
  "Error: "
]

Obnoxious JSON formatting aside, it gives a clue as to the cause: “The provided EoS is not monotonically increasing, and execution has been stopped.”
(This should be handled better by the QLIMR module, which should catch this error and ensure the message is returned to the CE so that you see it instead of the vauge 500 error: @carlosc7)

Side note: In this scenario, where you have used one (often expensive) workflow to generate some data, like the eos.csv file in your case, and then you want to run various workflows that use this as their input, you don’t need to download and upload the file. Instead, you can save the job that generated the EoS and then directly reference its output in subsequent workflows; for example:

...
- name: qlimr-1
  module: qlimr
  inputs:
    input_eos:
      type: job
      uuid: 57388fe3-6932-4b45-b1d0-63463cc828ac
      path: /cmf/opt/output/CMF_output_for_Lepton_baryons.csv
  config:
    ...

Marking a job saved or public requires this endpoint retroactively:
PATCH /api/v0/ce/job/{id}/
or you can proactively flag it to be saved upon completion using the workflow.options.save_job boolean in the job creation API POST /api/v0/ce/job/.
(@mrpelicer this is not documented well if at all, by the way. The difference needs to be articulated between setting “saved” to true upon job creation and the “options” setting it to “saved” only after it completes successfully. Update: I made a code issue to track the task.)

To complement Andrew’s answer, it is indeed quite hard to ensure that a matched EOS is stable and monotonically increasing. This is exactly what we explored in this paper, which you should be able to reproduce using these notebooks.

But from your config, this part:

  config:
    global:
      verbose: 0
      synthesis_type: attach
      check_eos_causality: false
      check_eos_stability: false
    attach_method:
      add_gap: false
      attach_value: 1300
      attach_variable: baryon_chemical_potential
      attach_lower_value: 900
      attach_upper_value: 1500

tells me you are attaching the EOSs at muB=1300 instead of smoothly matching them. This is quite a high muB, so if the crust model has a higher pressure than the core model, it will lead to an unstable EOS - which if I remember correctly, is the case with CMF and crust-DFT.

I’d recommend trying to attach the models using

      attach_value: 0.08
      attach_variable: baryon_density

or adding a small gap between the two EOS to minimize the changes of the matched EOS being unstable.

Still getting the same error, is it possible that it’s because of the CMF?

I suspect that because yesterday I tried the QLIMR with ChEFT+Crust-DFT and it worked

Yes, matching the EOS is very model dependent. I suggest you plot the EOS and check if dP/de < 0 at any point. That’ll tell you if the issue is with the CMF EOS itself or with the way you matched them.