Bad FEType Error with Mesh Adaptivity

3 views
Skip to first unread message

Go Goal

unread,
Jan 27, 2021, 11:02:06 PM1/27/21
to Moose User Group
Dear all,

I am trying to solve fluid-chemistry-thermal diffusion PDEs with several blocks in the Navier-Stokes module:
捕获.PNG

With the adaptivity block, an error message " ERROR: Bad FEType.family= 41  " always comes after the first converged step. Without the adaptivity block, the calculation can continue, but it is hard to converge. Below is the adaptivity block:

[Adaptivity]
  marker = errorfrac  #this line when commented, switches off adaptivity
  max_h_level = 3
  #steps = 2 #this line gets ignored in a transient run
  [./Indicators]
    [./error]
      type = GradientJumpIndicator
      variable = Cure
      outputs = none
    [../]
        [./error2]
      type = GradientJumpIndicator
      variable = Temperature
      outputs = none
    [../]
    
  [../]
  [./Markers]
    [./errorfrac]
      type = ErrorFractionMarker
      refine = 0.65
      coarsen = 0.2
      indicator = error
      outputs = none
    [../]
    
  [../]
[]

I'm not sure about whether the types of marker and indicator are supported in the Navier-Stokes package or if it is the cause of the error.

Can I get some suggestions on this? The full script is attached below.

Thank you in advance!
Yuan


[GlobalParams]
  supg = true
  pspg = true
  alpha = 1e-1
[]

[Mesh]
  file = FluidNew.inp
  uniform_refine = 0
  construct_side_list_from_node_list = true
  dim = 2
[]

[AuxVariables]
  [vel_x]
    order = FIRST
  []
  [vel_y]
    order = FIRST
  []
[]

[AuxKernels]
  [vel_x]
    type = VectorVariableComponentAux
    variable = vel_x
    vector_variable = velocity
    component = 'x'
  []
  [vel_y]
    type = VectorVariableComponentAux
    variable = vel_y
    vector_variable = velocity
    component = 'y'
  []
[]


[Variables]

  [./velocity]
    order = FIRST
    family = LAGRANGE_VEC
  [../]

  [./Temperature]
    order = FIRST
    family = LAGRANGE
    initial_condition = '20'
  [../]

  [./p]
  [../]
  
  [./Cure]
    order = FIRST
    family = LAGRANGE
    initial_condition = '0.3'

  [../]


[]



[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
 
  [./momentum_time]
    type = INSADMomentumTimeDerivative
    variable = velocity
  [../]
  
  [./momentum_convection]
    type = INSADMomentumAdvection
    variable = velocity
  [../]

  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]


  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    p = p
    integrate_p_by_parts = true
  [../]

  [./temperature_advection]
   type = INSADTemperatureAdvection
   variable = Temperature
   velocity = velocity
 [../]

 [./temperature_time]
   type = ADHeatConductionTimeDerivative
   variable = Temperature
   specific_heat = 'cp'
   density_name = 'rho'
 [../]


 [./temperature_conduction]
   type = ADHeatConduction
   variable = Temperature
   thermal_conductivity = 'k'
 [../]

  [./coupledcurederv]
    type = CoupledCureTimeDerivative
    variable = Temperature
    v = Cure
  
  [../]


  

  
  [./curederv]
  type=TimeDerivative
  variable = Cure
  lumping=false

  [../]  
 
 

 [./cureformula]
  type=DCPDnonDgeneralPT
  variable = Cure
  v = Temperature #this is the coupled variable
  Ttrig = '1'
  Tintl = '0'
  #_E = '82179.5'
  #_n = '2.2275'
  #_Kcat = '0'
  _E= '110750'
  _n= '1.7215'
  _m= '0.77'
  _cd= '14.4778'
  _ad= '0.405'
  [../]

  [./cureadvection]
  type=CureAdvection
  variable = Cure
  v = velocity
  [../]

[]


    


[BCs]
  [./no_slip]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = Top
  [../]

  [./no_slip2]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = Bottom
  [../]

  [./lid]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = Left
    function_x = 'lid_function'
  [../]

  [./outlet_p]
    type = DirichletBC
    variable = p
    boundary = Right
    value = 0.0
  [../]

  [./Initiation]
    type = DirichletBC
    #type = NeumannBC
   variable = Temperature
    boundary = Left
    value = '200'    
  [../]
[]




#length is 5*30mm, Rm is 5mm
[Materials]
  [./DCPD]
block = 0
    type = GenericConstantMaterial

        prop_names = 'specific_heat Hr density TConductivity A mu rho cp k'
    prop_values = '1600000 350000000 9.8e-7 0.152 8.55e15 15000000 9.8e-7 1600000 0.152'  # polymer attributes

  [../]
  [ins_mat]
    type = INSADMaterial
    velocity = velocity
    pressure = p
    transient_term = true
    integrate_p_by_parts = true
  []

[]

[Functions]
  [./lid_function]
    # We pick a function that is exactly represented in the velocity
    # space so that the Dirichlet conditions are the same regardless
    # of the mesh spacing.
    type = ParsedFunction
    value = '5e-5*y*(4-y)'
  [../]
[]

[Preconditioning]
  [./SMP]
    type = SMP
    full = true
    solve_type = 'NEWTON'
  [../]
[]



[Executioner]
  type = Transient
  num_steps = 10000

  nl_rel_tol = 1e-5

  end_time=200

  nl_max_its=10
  l_max_its=15
  
  [./TimeStepper]
    type = ConstantDT    
    dt = 0.01
    # dt = 3.6e14 
  [../]
  
  [./TimeIntegrator]
   type = ImplicitEuler
[../]
  
  #Preconditioned JFNK (default)
  #solve_type = 'PJFNK'
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
  #petsc_options_iname = '-pc_type'
  #petsc_options_value = 'gamg'
  
[]


[Adaptivity]
  marker = errorfrac  #this line when commented, switches off adaptivity
  max_h_level = 3
  #steps = 2 #this line gets ignored in a transient run
  [./Indicators]
    [./error]
      type = GradientJumpIndicator
      variable = Cure
      outputs = none
    [../]
        [./error2]
      type = GradientJumpIndicator
      variable = Temperature
      outputs = none
    [../]
    
  [../]
  [./Markers]
    [./errorfrac]
      type = ErrorFractionMarker
      refine = 0.65
      coarsen = 0.2
      indicator = error
      outputs = none
    [../]
    
  [../]
[]

[Controls]
  [./bcs]
    type = TimePeriod
    disable_objects = 'BCs::Initiation'
    start_time = '1.0' #'1718880'  '1317808'   
    execute_on = 'initial timestep_begin'
  [../]   

[]

[Outputs] 
  execute_on = 'timestep_end' # Limit the output to timestep end (removes initial condition)
  [./console]
    type = Console
    perf_log = true          # enable performance logging    
  [../]
  [./exodus]
    type = Exodus
    execute_on = 'initial timestep_end' # output the initial condition for the file
    output_material_properties = true
    show_material_properties = 'specific_heat thermal_conductivity'
    file_base = ./Fluid/DCPD # set the file base (the extension is automatically applied) 
    interval = 10         # only output every 10 step
  [../]  
[]


Reply all
Reply to author
Forward
0 new messages