diff --git a/examples/multiapp/yttria_thermoelectric/reference_residual/function_electricpotential/micro_yttria_thermoelectric_twoway_lots_controls.i b/examples/multiapp/yttria_thermoelectric/reference_residual/function_electricpotential/micro_yttria_thermoelectric_twoway_lots_controls.i new file mode 100644 index 00000000..6df79dbd --- /dev/null +++ b/examples/multiapp/yttria_thermoelectric/reference_residual/function_electricpotential/micro_yttria_thermoelectric_twoway_lots_controls.i @@ -0,0 +1,755 @@ +#This example uses updated electrochemical phase-field model, which includes +#Y and O vacancies as defect species (intrinsic defects) +#One-way coupling from engineering scale to phase-field +#Units are V for potential, nm for length +initial_field=10 #from the engineering scale, starting value 10 V/m +initial_temperature=300 #from the engineering scale, starting value 300K +initial_voltage=0.0001 + +[Mesh] + [gen] + type = GeneratedMeshGenerator + dim = 2 + nx = 300 + ny = 320 + xmin = 250 + xmax = 550 + ymin = 230 + ymax = 550 + [] + [new_nodeset] + input = gen + type = ExtraNodesetGenerator + coord = '400 390' + new_boundary = 1000 + [] +[] + +[GlobalParams] + op_num = 8 + var_name_base = gr + int_width = 4 +[] + +[Variables] + [./wvy] + [../] + [./wvo] + [../] + [./phi] + [../] + [./PolycrystalVariables] + [../] + [./V] + [../] + [./dV] + [../] + [./Tx_AEH] #Temperature used for the x-component of the AEH solve + initial_condition = 300 + [../] + [./Ty_AEH] #Temperature used for the y-component of the AEH solve + initial_condition = 300 + [../] + [Vx_AEH] #Voltage potential used for the x-component of the AEH solve + initial_condition = ${initial_voltage} + [] + [Vy_AEH] #Voltage potential used for the y-component of the AEH solve + initial_condition = ${initial_voltage} + [] +[] + +[AuxVariables] + [./bnds] + [../] + [./F_loc] + order = CONSTANT + family = MONOMIAL + [../] + [./negative_V] + [../] + [./E_x] + order = CONSTANT + family = MONOMIAL + [../] + [./E_y] + order = CONSTANT + family = MONOMIAL + [../] + [./negative_dV] + [../] + [./dE_x] + order = CONSTANT + family = MONOMIAL + [../] + [./dE_y] + order = CONSTANT + family = MONOMIAL + [../] + [./n_cat_aux] + order = CONSTANT + family = MONOMIAL + [../] + [./n_an_aux] + order = CONSTANT + family = MONOMIAL + [../] + [./T] + [../] + [./Q_joule] #Problem units of eV/nm^3/s + order = CONSTANT + family = MONOMIAL + [../] +[] + +[ICs] + [./phi_IC] + type = SmoothCircleFromFileIC + invalue = 0 + outvalue = 1 + file_name = 'uniform_60_2D.txt' + variable = phi + [../] + [./PolycrystalICs] + [./PolycrystalColoringIC] + polycrystal_ic_uo = circle_IC + [../] + [../] + [./T_IC] + type = ConstantIC + variable = T + value = 1600 + [../] +[] + +[UserObjects] + [./circle_IC] + type = PolycrystalCircles + file_name = 'uniform_60_2D.txt' + read_from_file = true + execute_on = 'initial' + threshold = 0.2 + connecting_threshold = 0.08 + [../] + [./grain_tracker] + type = GrainTracker + remap_grains = true + threshold = 0.2 + connecting_threshold = 0.08 + compute_halo_maps = false + halo_level = 4 + [../] +[] + +[BCs] + [./dV_top] + type = FunctionDirichletBC + preset = true + variable = dV + boundary = top + function = top_bc_funct + [../] + [./dV_bottom] + type = DirichletBC + preset = true + variable = dV + boundary = bottom + value = 0 + [../] + [./Periodic] + [./all] + auto_direction = 'x y' + variable = 'Tx_AEH Ty_AEH Vx_AEH Vy_AEH' + [../] + [../] + [fix_AEH_Tx] #Fix Tx_AEH at a single point + type = PostprocessorDirichletBC + variable = Tx_AEH + postprocessor = T_postproc + boundary = 1000 + [] + [fix_AEH_Ty] #Fix Ty_AEH at a single point + type = PostprocessorDirichletBC + variable = Ty_AEH + postprocessor = T_postproc + boundary = 1000 + [] + [fix_AEH_Vx] #Fix Tx_AEH at a single point + type = PostprocessorDirichletBC + variable = Vx_AEH + postprocessor = V_postproc + boundary = 1000 + [] + [fix_AEH_Vy] #Fix Ty_AEH at a single point + type = PostprocessorDirichletBC + variable = Vy_AEH + postprocessor = V_postproc + boundary = 1000 + [] +[] + +[Functions] + [./top_bc_funct] + type = ParsedFunction + vars = 'L_y E_y' #L_y is the length of the domain in the y-direction + vals = '320 Ey_in' + value = 'L_y * E_y * 1e-9' #1e-9 converts from length units of m in engineering scale to nm in phase-field + [../] + [./temp_switch] + type = ParsedFunction + vars = 'center_temp' + vals = 'T_postproc' + value = 'if(center_temp > 1100, 1, 0)' + [../] +[] + +[Controls] + [solve_on] + type = BoolFunctionControl + function = temp_switch + parameter = '*/*/solve' + execute_on = 'initial timestep_begin' + [] +[] + +[Materials] + # Free energy coefficients for parabolic curves + [./ks_cat] + type = ParsedMaterial + f_name = ks_cat + args = 'T' + constant_names = 'a b Va' + constant_expressions = '-0.0017 140.44 0.03726' + function = '(a*T + b) * Va^2' + [../] + [./ks_an] + type = ParsedMaterial #TODO re-fit this for oxygen + f_name = ks_an + args = 'T' + constant_names = 'a b Va' + constant_expressions = '-0.0017 140.44 0.03726' + function = '(a*T + b) * Va^2' + [../] + [./kv_cat] + type = ParsedMaterial + f_name = kv_cat + material_property_names = 'ks_cat' + function = '10*ks_cat' + [../] + [./kv_an] + type = ParsedMaterial + f_name = kv_an + material_property_names = 'ks_cat' + function = '10*ks_cat' + [../] + # Diffusivity and mobilities + [./chiDy] + type = GrandPotentialTensorMaterial + f_name = chiDy + diffusivity_name = Dvy + solid_mobility = L + void_mobility = Lv + chi = chi_cat + surface_energy = 6.24 + c = phi + T = T + D0 = 5.9e9 + GBmob0 = 1.60e12 + Q = 4.14 + Em = 4.25 + bulkindex = 1 + gbindex = 1e6 + surfindex = 1e9 + [../] + [./chiDo] + type = GrandPotentialTensorMaterial + f_name = chiDo + diffusivity_name = Dvo + solid_mobility = Lo + void_mobility = Lvo + chi = chi_an + surface_energy = 6.24 + c = phi + T = T + D0 = 5.9e11 + GBmob0 = 1.60e12 + Q = 4.14 + Em = 4.25 + bulkindex = 1 + gbindex = 1e6 + surfindex = 1e9 + [../] + # Everything else + [./ns_y_min] + type = DerivativeParsedMaterial + f_name = ns_y_min + args = 'gr0 gr1 gr2 gr3 gr4 gr5 gr6 gr7 T' + constant_names = 'Ef_B c_GB kB Va_Y' + constant_expressions = '4.37 0.1 8.617343e-5 0.03726' + derivative_order = 2 + function = 'c_B:=exp(-Ef_B/kB/T); bnds:=gr0^2 + gr1^2 + gr2^2 + gr3^2 + gr4^2 + gr5^2 + gr6^2 + gr7^2; + (c_B + 4.0 * c_GB * (1.0 - bnds)^2) / Va_Y' + [../] + [./ns_o_min] + type = DerivativeParsedMaterial + f_name = ns_o_min + args = 'gr0 gr1 gr2 gr3 gr4 gr5 gr6 gr7 T' + constant_names = 'Ef_B c_GB kB Va_O' + constant_expressions = '1.25 0.1 8.617343e-5 0.02484' + derivative_order = 2 + function = 'c_B:=exp(-Ef_B/kB/T); bnds:=gr0^2 + gr1^2 + gr2^2 + gr3^2 + gr4^2 + gr5^2 + gr6^2 + gr7^2; + (c_B + 4.0 * c_GB * (1.0 - bnds)^2) / Va_O' + [../] + [./sintering] + type = ElectrochemicalSinteringMaterial + chemical_potentials = 'wvy wvo' + electric_potential = V + void_op = phi + Temperature = T + surface_energy = 6.24 + grainboundary_energy = 6.24 + solid_energy_coefficients = 'kv_cat kv_cat' + void_energy_coefficients = 'kv_cat kv_an' + min_vacancy_concentrations_solid = 'ns_y_min ns_o_min' + min_vacancy_concentrations_void = '26.837 40.2555' + defect_charges = '-3 2' + solid_relative_permittivity = 15 + solid_energy_model = PARABOLIC + [../] + [./density_chi_y] + type = ElectrochemicalDefectMaterial + chemical_potential = wvy + void_op = phi + Temperature = T + electric_potential = V + void_density_name = nv_cat + solid_density_name = ns_cat + chi_name = chi_cat + void_energy_coefficient = kv_cat + solid_energy_coefficient = ks_cat + min_vacancy_concentration_solid = ns_y_min + min_vacancy_concentration_void = 26.837 + solid_energy_model = PARABOLIC + defect_charge = -3 + solid_relative_permittivity = 15 + [../] + [./density_chi_o] + type = ElectrochemicalDefectMaterial + chemical_potential = wvo + void_op = phi + Temperature = T + electric_potential = V + void_density_name = nv_an + solid_density_name = ns_an + chi_name = chi_an + void_energy_coefficient = kv_an + solid_energy_coefficient = ks_an + min_vacancy_concentration_solid = ns_o_min + min_vacancy_concentration_void = 40.2555 + solid_energy_model = PARABOLIC + defect_charge = 2 + solid_relative_permittivity = 15 + [../] + + [./permittivity] + type = DerivativeParsedMaterial + f_name = permittivity + args = 'phi' + material_property_names = 'hs hv' + constant_names = 'eps_rel_solid eps_void_over_e' + constant_expressions = '15 5.52e-2' #eps_void_over_e in 1/V/nm + derivative_order = 2 + function = '-hs * eps_rel_solid * eps_void_over_e - hv * eps_void_over_e' + [../] + [./solid_pre] + type = DerivativeParsedMaterial + f_name = solid_pre + material_property_names = 'hs ns_y_min ns_o_min' + constant_names = 'Z_cat Z_an' + constant_expressions = '-3 2' + derivative_order = 2 + function = '-hs * (Z_cat * ns_y_min + Z_an * ns_o_min)' + [../] + [./void_pre] + type = DerivativeParsedMaterial + f_name = void_pre + material_property_names = 'hv' + constant_names = 'Z_cat Z_an nv_y_min nv_o_min' + constant_expressions = '-3 2 26.837 40.2555' + derivative_order = 2 + function = '-hv * (Z_cat * nv_y_min + Z_an * nv_o_min)' + [../] + [./cat_mu_pre] + type = DerivativeParsedMaterial + f_name = cat_mu_pre + material_property_names = 'hs hv ks_cat kv_cat' + constant_names = 'Z_cat' + constant_expressions = '-3' + derivative_order = 2 + function = '-hs * Z_cat / ks_cat - hv * Z_cat / kv_cat' + [../] + [./an_mu_pre] + type = DerivativeParsedMaterial + f_name = an_mu_pre + material_property_names = 'hs hv ks_an kv_an' + constant_names = 'Z_an' + constant_expressions = '2' + derivative_order = 2 + function = '-hs * Z_an / ks_an - hv * Z_an / kv_an' + [../] + [./cat_V_pre] + type = DerivativeParsedMaterial + f_name = cat_V_pre + material_property_names = 'hs hv ks_cat kv_cat' + constant_names = 'Z_cat v_scale e ' + constant_expressions = '-3 1 1' + derivative_order = 2 + function = 'hs * Z_cat^2 * e * v_scale / ks_cat + hv * Z_cat^2 * e * v_scale / kv_cat' + [../] + [./an_V_pre] + type = DerivativeParsedMaterial + f_name = an_V_pre + material_property_names = 'hs hv ks_an kv_an' + constant_names = 'Z_an v_scale e ' + constant_expressions = '2 1 1' + derivative_order = 2 + function = 'hs * Z_an^2 * e * v_scale / ks_an + hv * Z_an^2 * e * v_scale / kv_an' + [../] + [./n_cat] + type = ParsedMaterial + f_name = n_cat + material_property_names = 'hs ns_cat hv nv_cat' + function = '(hs*ns_cat + hv*nv_cat)' + [../] + [./n_an] + type = ParsedMaterial + f_name = n_an + material_property_names = 'hs ns_an hv nv_an' + function = '(hs*ns_an + hv*nv_an)' + [../] + [./constants] + type = GenericConstantMaterial + prop_names = 'gamma_gb' + prop_values = '1.0154' + [../] + [./electrical_conductivity] + type = DerivativeParsedMaterial + f_name = electrical_conductivity + args = 'phi T' + material_property_names = 'hs hv n_cat n_an' + constant_names = 'kB D0_O Em_O D0_Y Em_Y Z_Y Z_O' + constant_expressions = '8.617e-5 5.9e11 4.25 5.9e9 4.25 3 2' + derivative_order = 2 + function = '(Z_Y^2 * abs(n_cat) * D0_Y * exp(-Em_Y/kB/T) / kB / T + Z_O^2 * abs(n_an) * D0_O * exp(-Em_O/kB/T) / kB / T)*hs + 1e-3' + # function = '1' + outputs = exodus + [../] + [thermal_conductivity] + type = ParsedMaterial + f_name = thermal_conductivity + args = 'phi T' + constant_names = 'prefactor_void prefactor_solid' + constant_expressions = '3.21406 3214.06' #in W/(m-K) #solid value from Larry's curve fitting, data from Klein and Croft, JAP, v. 38, p. 1603 and UC report "For Computer Heat Conduction Calculations - A compilation of thermal properties data" by A.L. Edwards, UCRL-50589 (1969) + function = '(phi * prefactor_void + (1-phi) * prefactor_solid) / (T - 147.73)' + outputs = exodus + [] +[] + +[Modules] + [./PhaseField] + [./GrandPotential] + switching_function_names = 'hv hs' + anisotropic = 'true true' + + chemical_potentials = 'wvy wvo' + mobilities = 'chiDy chiDo' + susceptibilities = 'chi_cat chi_an' + free_energies_w = 'nv_cat ns_cat nv_an ns_an' + + gamma_gr = gamma_gb + mobility_name_gr = L + kappa_gr = kappa + free_energies_gr = 'omegav omegas' + + additional_ops = 'phi' + gamma_grxop = gamma + mobility_name_op = Lv + kappa_op = kappa + free_energies_op = 'omegav omegas' + [../] + [../] +[] + +[Kernels] + [./Laplace] + type = MatDiffusion + variable = V + diffusivity = permittivity + args = 'phi' + [../] + [./potential_solid_constants] + type = MaskedBodyForce + variable = V + args = 'phi' + mask = solid_pre + [../] + [./potential_void_constants] + type = MaskedBodyForce + variable = V + args = 'phi' + mask = void_pre + [../] + [./potential_cat_mu] + type = MatReaction + variable = V + v = wvy + mob_name = cat_mu_pre + [../] + [./potential_an_mu] + type = MatReaction + variable = V + v = wvo + mob_name = an_mu_pre + [../] + [./potential_cat_V] + type = MatReaction + variable = V + mob_name = cat_V_pre + [../] + [./potential_an_V] + type = MatReaction + variable = V + mob_name = an_V_pre + [../] + [./Laplace_dV] + type = MatDiffusion + variable = dV + diffusivity = electrical_conductivity + args = 'phi' + [../] + [./heat_x] #Following kernels are for AEH approach to calculate thermal cond. + type = HeatConduction + variable = Tx_AEH + [../] + [./heat_rhs_x] + type = HomogenizedHeatConduction + variable = Tx_AEH + component = 0 + [../] + [./heat_y] + type = HeatConduction + variable = Ty_AEH + [../] + [./heat_rhs_y] + type = HomogenizedHeatConduction + variable = Ty_AEH + component = 1 + [../] + [voltage_x] #The following four kernels are for AEH approach to calculate electrical cond. + type = HeatConduction + variable = Vx_AEH + diffusion_coefficient = electrical_conductivity + [] + [voltage_rhs_x] + type = HomogenizedHeatConduction + variable = Vx_AEH + component = 0 + diffusion_coefficient = electrical_conductivity + [] + [voltage_y] + type = HeatConduction + variable = Vy_AEH + diffusion_coefficient = electrical_conductivity + [] + [voltage_rhs_y] + type = HomogenizedHeatConduction + variable = Vy_AEH + component = 1 + diffusion_coefficient = electrical_conductivity + [] +[] + + +[AuxKernels] + [./bnds_aux] + type = BndsCalcAux + variable = bnds + execute_on = 'initial timestep_end' + [../] + [./negative_V] + type = ParsedAux + variable = negative_V + args = V + function = '-V' + [../] + [./E_x] + type = VariableGradientComponent + variable = E_x + gradient_variable = negative_V + component = x + [../] + [./E_y] + type = VariableGradientComponent + variable = E_y + gradient_variable = negative_V + component = y + [../] + [./negative_dV] + type = ParsedAux + variable = negative_dV + args = dV + function = '-dV' + [../] + [./dE_x] + type = VariableGradientComponent + variable = dE_x + gradient_variable = negative_dV + component = x + [../] + [./dE_y] + type = VariableGradientComponent + variable = dE_y + gradient_variable = negative_dV + component = y + [../] + [./n_cat_aux] + type = MaterialRealAux + variable = n_cat_aux + property = n_cat + [../] + [./n_an_aux] + type = MaterialRealAux + variable = n_an_aux + property = n_an + [../] + [./Q_joule_aux] + type = JouleHeatingHeatGeneratedAux + variable = Q_joule + electrical_conductivity = electrical_conductivity + elec = dV + [../] +[] + +[Postprocessors] + [./memory] + type = MemoryUsage + outputs = csv + [../] + [./n_DOFs] + type = NumDOFs + outputs = csv + [../] + [./dt] + type = TimestepSize + [../] + [./ns_cat_total] + type = ElementIntegralMaterialProperty + mat_prop = n_cat + [../] + [./ns_an_total] + type = ElementIntegralMaterialProperty + mat_prop = n_an + [../] + [./void_tracker] + type = FeatureFloodCount + execute_on = 'initial timestep_end' + variable = phi + threshold = 0.5 + compute_var_to_feature_map = true + [../] + [./Q_joule_total] + type = ElementIntegralVariablePostprocessor + variable = Q_joule + [../] + [Ey_in] + type = Receiver + default = ${initial_field} + [] + [T_postproc] + type = Receiver + default = ${initial_temperature} + [] + [V_postproc] + type = Receiver + default = ${initial_voltage} + [] + [k_x_AEH] #Effective thermal conductivity in x-direction from AEH + type = HomogenizedThermalConductivity + variable = Tx_AEH + temp_x = Tx_AEH + temp_y = Ty_AEH + component = 0 + execute_on = TIMESTEP_END + [] + [k_y_AEH] #Effective thermal conductivity in y-direction from AEH + type = HomogenizedThermalConductivity + variable = Ty_AEH + temp_x = Tx_AEH + temp_y = Ty_AEH + component = 1 + execute_on = TIMESTEP_END + [] + [k_AEH_average] + type = LinearCombinationPostprocessor + pp_coefs = '0.5 0.5' + pp_names = 'k_x_AEH k_y_AEH' + [] + [sigma_x_AEH] #Effective electrical conductivity in x-direction from AEH + type = HomogenizedThermalConductivity + variable = Vx_AEH + temp_x = Vx_AEH + temp_y = Vy_AEH + component = 0 + execute_on = TIMESTEP_END + diffusion_coefficient = electrical_conductivity + [] + [sigma_y_AEH] #Effective electrical conductivity in y-direction from AEH + type = HomogenizedThermalConductivity + variable = Vy_AEH + temp_x = Vx_AEH + temp_y = Vy_AEH + component = 1 + execute_on = TIMESTEP_END + diffusion_coefficient = electrical_conductivity + [] +[] + +[Preconditioning] + [./SMP] + type = SMP + full = true + [../] +[] + +[Executioner] + type = Transient + scheme = bdf2 + solve_type = PJFNK + petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart -sub_ksp_type' + petsc_options_value = ' asm lu 1 31 preonly' + nl_max_its = 40 + l_max_its = 30 + l_tol = 1e-4 + nl_rel_tol = 1e-8 + nl_abs_tol = 4e-9 + start_time = 0 + end_time = 2400 + # num_steps = 1 + automatic_scaling = true + [./TimeStepper] + type = IterationAdaptiveDT + dt = 0.025 + optimal_iterations = 10 + iteration_window = 2 + [../] +[] + +[Debug] + show_var_residual_norms = true +[] + +[Outputs] + perf_graph = true + csv = true + exodus = true + checkpoint = true +[] diff --git a/examples/multiapp/yttria_thermoelectric/reference_residual/function_electricpotential/twoway_coupling_demo_new_phasefield_lots_controls.i b/examples/multiapp/yttria_thermoelectric/reference_residual/function_electricpotential/twoway_coupling_demo_new_phasefield_lots_controls.i new file mode 100644 index 00000000..b7fea83e --- /dev/null +++ b/examples/multiapp/yttria_thermoelectric/reference_residual/function_electricpotential/twoway_coupling_demo_new_phasefield_lots_controls.i @@ -0,0 +1,335 @@ +#This example uses updated electrochemical phase-field model, which includes +#Y and O vacancies as defect species (intrinsic defects) +#Two-way coupling from engineering scale to phase-field +initial_temperature=300 + +[GlobalParams] + order = SECOND +[] + +[Mesh] + [yttria_block] + type = GeneratedMeshGenerator + dim = 2 + nx = 25 + ny = 20 + xmax = 0.01 #10mm + ymax = 0.008 #8mm + elem_type = QUAD8 + second_order = true + [] +[] + +[Problem] + coord_type = RZ + type = ReferenceResidualProblem + reference_vector = 'ref' + extra_tag_vectors = 'ref' +[] + + +[Variables] + [temperature] + initial_condition = ${initial_temperature} + [] + [electric_potential] + [] +[] + +[AuxVariables] + [specific_heat_capacity_va] + initial_condition = 842.2 # at 1500K #568.73 at 1000K #447.281 # at 293K + [] + [density_va] + initial_condition = 3106.2 ##5010.0*(1-${initial_porosity}) #in kg/m^3 + [] + [heat_transfer_radiation] + [] + + [sigma_aeh] + initial_condition = 2.0e-10 #in units eV/((nV)^2-s-nm) + order = FIRST + family = LAGRANGE + [] + [E_x] + order = FIRST + family = MONOMIAL + [] + [E_y] + order = FIRST + family = MONOMIAL + [] + [current_density_J] + family = NEDELEC_ONE + order = FIRST + [] + [thermal_conductivity_aeh] + initial_condition = 3.0 + order = FIRST + family = LAGRANGE + [] + [Q_from_sub] #this will be in eV/m/s, will need unit conversion to J/m^3/s based on phase-field domain size + order = FIRST + family = LAGRANGE + [] +[] + +[Kernels] + [HeatDiff_yttria] + type = ADHeatConduction + variable = temperature + thermal_conductivity = yttria_thermal_conductivity #use parsed material property + extra_vector_tags = 'ref' + [] + [HeatTdot_yttria] + type = ADHeatConductionTimeDerivative + variable = temperature + specific_heat = yttria_specific_heat_capacity #use parsed material property + density_name = yttria_density + extra_vector_tags = 'ref' + [] + [electric_yttria] + type = ConductivityLaplacian + variable = electric_potential + conductivity_coefficient = electrical_conductivity + use_displaced_mesh = true + extra_vector_tags = 'ref' + [] + [heat_source] + type = MaskedBodyForce + mask = Q_SI + variable = temperature + [] +[] + +[AuxKernels] + [heat_transfer_radiation] + type = ParsedAux + variable = heat_transfer_radiation + boundary = right + args = 'temperature' + constant_names = 'boltzmann epsilon temperature_farfield' #published emissivity for graphite is 0.85, but use 0.1 to prevent too much heat loss + constant_expressions = '5.67e-8 0.1 1600.0' #estimated farfield temperature, to stand in for graphite, in a manner + function = '-boltzmann*epsilon*(temperature^4-temperature_farfield^4)' + [] + [E_x] + type = VariableGradientComponent + variable = E_x + gradient_variable = electric_potential + component = x + [] + [E_y] + type = VariableGradientComponent + variable = E_y + gradient_variable = electric_potential + component = y + [] + [current_density_J] + type = ADCurrentDensity + variable = current_density_J + potential = electric_potential + [] +[] + +[BCs] + [external_surface] + type = CoupledVarNeumannBC + boundary = right + variable = temperature + v = heat_transfer_radiation + [] + # [internal_surface_temperature] #might be needed since yttia conductivity is low + # type = FunctionDirichletBC + # boundary = left + # variable = temperature + # function = '${initial_temperature} + 50.0/60.0*t' #stand-in for a 50C/min heating rate + # [] + [electric_top] + type = ADFunctionDirichletBC + variable = electric_potential + boundary = top + function = 'if(t<20.0, 4.0e-3*t, 0.08)' #rate roughly from Cincotti, per discussion with Casey + [] + [electric_bottom] + type = ADDirichletBC + variable = electric_potential + boundary = bottom + value = 0.0 + [] +[] + +[Materials] + [yttria_thermal_conductivity] + type = ADParsedMaterial + # args = 'temperature' + # function = '3214.46 / (temperature - 147.73)' #in W/(m-K) #Given from Larry's curve fitting, data from Klein and Croft, JAP, v. 38, p. 1603 and UC report "For Computer Heat Conduction Calculations - A compilation of thermal properties data" by A.L. Edwards, UCRL-50589 (1969) + args = 'thermal_conductivity_aeh' + function = 'thermal_conductivity_aeh' #in W/(m-K) directly, for now + f_name = 'yttria_thermal_conductivity' + output_properties = yttria_thermal_conductivity + outputs = 'csv exodus' + [] + [yttria_specific_heat_capacity] + type = ADParsedMaterial + f_name = yttria_specific_heat_capacity + args = 'specific_heat_capacity_va' + function = 'specific_heat_capacity_va' #in J/(K-kg) + output_properties = yttria_specific_heat_capacity + outputs = 'csv exodus' + [] + [yttria_density] + type = ADParsedMaterial + f_name = 'yttria_density' + args = 'density_va' + function = 'density_va' + output_properties = yttria_density + outputs = 'csv exodus' + [] + [electrical_conductivity] + type = ADParsedMaterial + args = 'sigma_aeh' + function = 'sigma_aeh*1.602e-10' #converts to units of J/(V^2-m-s) + f_name = 'electrical_conductivity' + output_properties = electrical_conductivity + outputs = 'exodus csv' + # type = ADDerivativeParsedMaterial + # f_name = electrical_conductivity + # args = 'temperature' + # constant_names = 'Q_elec kB prefactor_solid initial_porosity' + # constant_expressions = '1.61 8.617343e-5 1.25e-4 0.38' + # function = '(1-initial_porosity) * prefactor_solid * exp(-Q_elec/kB/temperature) * 1.602e8' # in eV/(nV^2 s nm) per chat with Larry, last term converts to units of J/(V^2-m-s) + [] + [Q_SI] + type = ParsedMaterial + f_name = Q_SI + args = 'Q_from_sub' + function = 'Q_from_sub / 300 / 320 * 0.1602' #divide by domain size and unit conversion to go from eV/S to J/m^3/s + outputs = 'exodus' + [] +[] + +[Executioner] + type = Transient + solve_type = NEWTON + automatic_scaling = true + line_search = 'none' + compute_scaling_once = false + + petsc_options_iname = '-pc_type -pc_factor_mat_solver_package' + petsc_options_value = ' lu superlu_dist' + petsc_options = '-snes_converged_reason -ksp_converged_reason' + + nl_forced_its = 1 + nl_rel_tol = 2e-5 #was 1e-10, for temperature only + nl_abs_tol = 2e-12 #was 1e-10, before that 1e-12 + nl_max_its = 20 + l_max_its = 50 + dtmin = 1.0e-4 + + end_time = 2400 + [TimeStepper] + type = IterationAdaptiveDT + dt = 0.05 + optimal_iterations = 8 + iteration_window = 2 + [] + # num_steps = 4 +[] + +[Postprocessors] + [temperature] + type = AverageNodalVariableValue + variable = temperature + [] + [yttria_thermal_conductivity] + type = ElementAverageValue + variable = yttria_thermal_conductivity + [] + [yttria_specific_heat_capacity] + type = ElementAverageValue + variable = yttria_specific_heat_capacity + [] + [yttria_density] + type = ElementAverageValue + variable = yttria_density + [] + [yttria_sigma] + type = ElementAverageValue + variable = electrical_conductivity + [] +[] + +[MultiApps] + [micro] + type = TransientMultiApp + # type = CentroidMultiApp # lauches one in the middle of each element so don't need to give positions + #can specify the number of procs + app_type = FreyaApp + positions = '0.0074 0.0058 0' #roughly the center of element 368 in this mesh + input_files = micro_yttria_thermoelectric_twoway_lots_controls.i + sub_cycling = true + execute_on = TIMESTEP_BEGIN #the default + [] +[] + +[Transfers] + [keff_from_sub] + type = MultiAppPostprocessorInterpolationTransfer + direction = from_multiapp + multi_app = micro + variable = thermal_conductivity_aeh + power = 2 #2 is the default value, tutorial uses 1 + postprocessor = k_AEH_average + [] + [sigma_aeh_eff_from_sub] + type = MultiAppPostprocessorInterpolationTransfer + direction = from_multiapp + multi_app = micro + variable = sigma_aeh + power = 2 #2 is the default value, tutorial uses 1 + postprocessor = sigma_y_AEH + [] + [Q_from_sub] + type = MultiAppPostprocessorInterpolationTransfer + direction = from_multiapp + multi_app = micro + variable = Q_from_sub #This is the integrated heat produced in the phase-field simulation in eV/m/s + power = 2 #2 is the default value, tutorial uses 1 + postprocessor = Q_joule_total + [] + [temperature_to_sub] + type = MultiAppVariableValueSampleTransfer + direction = to_multiapp + multi_app = micro + source_variable = temperature + variable = T + [] + [temperature_to_sub_postproc] + type = MultiAppVariableValueSamplePostprocessorTransfer + direction = to_multiapp + multi_app = micro + source_variable = temperature + postprocessor = T_postproc + [] + [potential_to_sub_postproc] + type = MultiAppVariableValueSamplePostprocessorTransfer + direction = to_multiapp + multi_app = micro + source_variable = electric_potential + postprocessor = V_postproc + [] + [micro_field_pp_to_sub] + type = MultiAppVariableValueSamplePostprocessorTransfer + direction = to_multiapp + multi_app = micro + source_variable = E_y + postprocessor = Ey_in + [] +[] + + +[Outputs] + csv = true + exodus = true + perf_graph = true +[] diff --git a/examples/multiapp/yttria_thermoelectric/reference_residual/function_electricpotential/uniform_60_2D.txt b/examples/multiapp/yttria_thermoelectric/reference_residual/function_electricpotential/uniform_60_2D.txt new file mode 100644 index 00000000..70560749 --- /dev/null +++ b/examples/multiapp/yttria_thermoelectric/reference_residual/function_electricpotential/uniform_60_2D.txt @@ -0,0 +1,61 @@ + x y z r + 375.440917 515.218266 0.000000 20.0000 + 275.182741 351.908368 0.000000 20.0000 + 295.447207 305.596507 0.000000 20.0000 + 214.406971 477.445893 0.000000 20.0000 + 245.228781 448.849956 0.000000 20.0000 + 310.922602 429.952503 0.000000 20.0000 + 423.061436 335.888128 0.000000 20.0000 + 532.598037 512.152512 0.000000 20.0000 + 574.503625 286.161179 0.000000 20.0000 + 406.100900 222.626964 0.000000 20.0000 + 259.796353 281.283048 0.000000 20.0000 + 353.374066 314.679729 0.000000 20.0000 + 382.780489 364.772526 0.000000 20.0000 + 488.097443 470.609183 0.000000 20.0000 + 492.993987 525.094525 0.000000 20.0000 + 320.365293 218.117404 0.000000 20.0000 + 413.403516 472.993431 0.000000 20.0000 + 455.334361 495.581135 0.000000 20.0000 + 513.304602 250.000513 0.000000 20.0000 + 457.320773 547.178723 0.000000 20.0000 + 386.715912 280.610507 0.000000 20.0000 + 323.008865 482.914471 0.000000 20.0000 + 232.272634 361.563547 0.000000 20.0000 + 413.516448 540.258432 0.000000 20.0000 + 291.297705 257.796331 0.000000 20.0000 + 429.805232 264.501202 0.000000 20.0000 + 575.678615 330.149283 0.000000 20.0000 + 505.778805 434.222356 0.000000 20.0000 + 531.441860 295.654180 0.000000 20.0000 + 366.488798 474.617139 0.000000 20.0000 + 279.985942 469.603957 0.000000 20.0000 + 402.834236 419.753740 0.000000 20.0000 + 360.966585 244.936820 0.000000 20.0000 + 325.510570 522.851134 0.000000 20.0000 + 528.224746 472.237055 0.000000 20.0000 + 228.053303 542.061509 0.000000 20.0000 + 492.635996 310.315244 0.000000 20.0000 + 421.934802 376.987165 0.000000 20.0000 + 536.155989 338.296635 0.000000 20.0000 + 353.609528 435.117163 0.000000 20.0000 + 554.679960 375.610463 0.000000 20.0000 + 320.650148 567.494519 0.000000 20.0000 + 346.341002 387.085553 0.000000 20.0000 + 277.788841 534.359778 0.000000 20.0000 + 325.602021 346.156205 0.000000 20.0000 + 467.804440 342.552614 0.000000 20.0000 + 249.371698 320.628116 0.000000 20.0000 + 440.233152 394.264806 0.000000 20.0000 + 357.870002 554.522813 0.000000 20.0000 + 247.782822 506.607792 0.000000 20.0000 + 302.000737 389.412825 0.000000 20.0000 + 507.923923 371.793229 0.000000 20.0000 + 258.618970 406.914732 0.000000 20.0000 + 327.026671 277.284824 0.000000 20.0000 + 481.235345 402.048978 0.000000 20.0000 + 451.829001 299.591970 0.000000 20.0000 + 441.748818 441.415994 0.000000 20.0000 + 474.015554 260.864981 0.000000 20.0000 + 542.558507 419.417163 0.000000 20.0000 + 495.812502 564.680833 0.000000 20.0000