idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.72k stars 1.04k forks source link

Aux Variable from initial_from_file_var can't be coupled in IC #13227

Open wxAMPS opened 5 years ago

wxAMPS commented 5 years ago

Bug Description

Auxiliary Variable initialized by initial_from_file_var can't be used as a coupled value in IC.

Steps to Reproduce

When initializing aux variable via the method of SolutionUserObject/SolutionFunction/FunctionIC, it can be coupled in the IC. A part of the input file looks as below:

[Mesh]
  file = pn_0V_out.e
[]

[Variables]
  [./n] 
    order = FIRST
    family = LAGRANGE   
    [./InitialCondition]
      type = InitFromPrev    #customized IC kernel for modifying previous solution
      prev = Efn_prev          #aux variable storing previous solution
      dv = 0.1 
    [../]
  [../]
[]

[UserObjects]
  [./soln]
    type = SolutionUserObject
    system = nl0 
    mesh = pn_0V_out.e    
    system_variables = Efn  #previous solution stored in the .e file
    execute_on = initial
  [../]
[]

[Functions]
  [./load_prev_func]  
    type = SolutionFunction
    solution = soln
  [../]
[]

[AuxVariables]  
  [./Efn_prev]
    order = FIRST
    family = LAGRANGE      
    [./InitialCondition]
      type = FunctionIC 
      function = load_prev_func
    [../]
  [../]
[]

However, if initializing the aux variable by using initial_from_file_var, as the second version below:

[AuxVariables]  
  [./Efn_prev]
    order = FIRST
    family = LAGRANGE      
    initial_from_file_var = Efn #previous solution stored in the .e file
  [../]
[]

it doesn't work, and prompts out the message Segmentation fault (core dumped) when running. More info can be seen at the link

Impact

Annoyance

permcody commented 5 years ago

Thanks for the ticket and information to reproduce.