libMesh / libmesh

libMesh github repository
http://libmesh.github.io
GNU Lesser General Public License v2.1
643 stars 285 forks source link

fparser exception #269

Closed nicholasmalaya closed 10 years ago

nicholasmalaya commented 10 years ago

I am getting an epic, massive amount of text in the output logs that repeatedly states:

AutoDiff exception: Unsupported opcode

This is with the latest libmesh/master, running the latest libgrins/grins. This error is non-blocking, in that my code functions despite the errors. Nevertheless, given that this appears to be an error in the fparser, I thought it should be documented.

My input file is nontrivial, but here goes:


# Options related to all Physics
[Physics]

enabled_physics = 'IncompressibleNavierStokes IncompressibleNavierStokesAdjointStabilization HeatTransfer HeatTransferAdjointStabilization BoussinesqBuoyancy BoussinesqBuoyancyAdjointStabilization VelocityPenalty'

# Options for Incompressible Navier-Stokes physics
[./IncompressibleNavierStokes]

V_FE_family = 'LAGRANGE'
P_FE_family = 'LAGRANGE'

V_order = 'FIRST'
P_order = 'FIRST'

rho = '1.77'
# 'gold standard'
#mu = '1.846e-5'
mu = '1.846e-1'
#mu = '1.846e-5'

# Boundary ids:
# k = bottom -> 0
# k = top    -> 5
# j = bottom -> 1
# j = top    -> 3
# i = bottom -> 4
# i = top    -> 2

bc_ids = '0 5'
bc_types = 'no_slip parsed_dirichlet'
bc_variables = 'na w'
bc_values = 'na 0.8'

pin_pressure = true
pin_location = '0.0 0.0 0.0'
pin_value = '0.0'

ic_ids = '0'
ic_types = 'parsed'
ic_variables = 'w'
ic_values = '(abs(x)<=2)*(abs(y)<=2)*0.001'

[../HeatTransfer]

T_FE_family = 'LAGRANGE'
T_order = 'FIRST'

# Boundary ids:
# k = bottom -> 0
# k = top    -> 5
# j = bottom -> 1
# j = top    -> 3
# i = bottom -> 4
# i = top    -> 2

bc_ids = '0 1 2 3 4'
bc_types = 'parsed_dirichlet parsed_dirichlet parsed_dirichlet parsed_dirichlet parsed_dirichlet'
bc_variables = 'T T T T T'
bc_values = '{340.0+(abs(x)<=2)*(abs(y)<=2)*30} {300.0} {300.0} {300.0} {300.0}'

ic_ids = '0'
ic_types = 'constant'
ic_variables = 'T'
ic_values = '300.0'

rho = '1.77'
Cp = '1004.9'

# 'gold standard'
#k = '2.624e-2'
k = '2.624'
#k = '2.624e-2'

[../BoussinesqBuoyancy]

# Reference temperature
T_ref = '300' #[K]

rho_ref = '1.77'

beta_T = '0.003333333333'

# Gravity vector
g = '0.0 0.0 -9.81' #[m/s^2]

[../VelocityPenalty]

# alpha := pi/3 radians
# tanalpha = sqrt(3)
# p := .864 meters
# r := sqrt(x^2+y^2)
# theta := atan2(y,x)
# gamma := atan((p/r-1)*tanalpha)
# phi := 3*pi/2+theta-gamma-alpha

#
# hybrid vane
#
penalty_function = '{r := sqrt(x^2+y^2); theta := atan2(y,x); gamma60 := pi/2 + theta -asin(1.47*sin(pi/3)/r); gamma10 := pi/2 + theta -asin(1.47*sin(pi/18)/r) ; 0.5*(tanh(-9*z + 0.1145)+1.0)*(r<1)*(r>0.5) * 1e2 * cos(gamma10) + 0.5*(tanh(9*z - 0.1145)+1.0)*(r<1)*(r>0.5)*(z<0.85) * 1e2 * cos(gamma60)}{r := sqrt(x^2+y^2); theta := atan2(y,x); gamma60 := pi/2 + theta -asin(1.47*sin(pi/3)/r); gamma10 := pi/2 + theta -asin(1.47*sin(pi/18)/r); 0.5*(tanh(-9*z + 0.1145)+1.0)*(r<1)*(r>0.5) * 1e2 * sin(gamma10) + 0.5*(tanh(9*z - 0.1145)+1.0)*(r<1)*(r>0.5)*(z<0.85) * 1e2 * sin(gamma60)}{0}'

[]

[Stabilization]

tau_constant_vel = '1.0'
tau_factor_vel = '1.0'

tau_constant_T = '1.0'
tau_factor_T = '1.0'

[]

[restart-options]

[]

# Mesh related options
[mesh-options]
mesh_option = create_3D_mesh
element_type = HEX8 
redistribute = '{x}{y}{z*tanh(2*z)}'

domain_x1_min = -3.0
domain_x1_max = 3.0
domain_x2_min = -3.0
domain_x2_max = 3.0
domain_x3_min = 0.0
domain_x3_max = 2.0

mesh_nx1 = '15' 
mesh_nx2 = '15' 
mesh_nx3 = '15'

#locally_h_refine='(abs(x^2+y^2)<2)*2 + (2            
dschwen commented 10 years ago

You cut off where it gets interesting. We may have to dial down error reporting. What is failing here is a new automatic differentiation step that can provide gradients for parsed functions. This is not impacting your runs at all.