Dear Moose developers,
where c_i and Psi are the ion concentration and the electric potential in an electrolyte, respectively. I have a boundary condition for the ion species for chemical reaction, which exponentially depends on the electric potential and has some linear dependence on the ion concentration.
The electric potential appears in the Poisson's equation which is:
The problem may be challenging because
1) The ion movement depends on the gradient of the electric potential
2) The two equations are coupled to each other.
3) The boundary condition is highly non-linear.
Has anyone worked on a similar model, and
I have made sure my Jacobian expressions are correct for the kernel for the weak form of nabla * (F*z_i*mu_i*c_i nabla *Psi) and the boundary condition expressions.
BoomerAMG in Hypre didn't decrease the linear residual at all. ASM worked better but takes thousands of iterations and the non-linear residual decrease is very small.
I am looking through the PETSc document (http://www.mcs.anl.gov/petsc/petsc-current/docs/), but also I would appreciate it if you could give me any suggestion!
Thank you,
Shohei
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/aac527c0-9399-43a0-a637-149494dfd293%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAFfxPjrR_ajOr8BrpyDxVQZm%3DE3F6oD6P4VcS4MDR7-Ced192w%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/be730973-b567-4a72-8e16-06fec56ebb03%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/b8839399-0c51-42ed-98d3-69e63263137f%40googlegroups.com.
Hi Shohei,Today, I have developed an example input file using NernstPlanckConvection kernel , and have just now uploaded in github repository, and it can be found in https://github.com/anilkunwar/ danphe/blob/working_codes/ examples/ Electrochemicalmigration/cu_ transport_phi_l450_small- length.i .
I am looking through the PETSc document (http://www.mcs.anl.gov/petsc/ petsc-current/docs/), but also I would appreciate it if you could give me any suggestion!
Thank you,
Shohei
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.co m.
Visit this group at https://groups.google.com/grou p/moose-users.
To view this discussion on the web visit https://groups.google.com/d/ms gid/moose-users/be730973-b567- 4a72-8e16-06fec56ebb03%40googl egroups.com.
For more options, visit https://groups.google.com/d/op tout.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@ googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/ msgid/moose-users/b8839399- 0c51-42ed-98d3-69e63263137f% 40googlegroups.com.
Shohei Ogawa
Visit this group at https://groups.google.com/ group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/ msgid/moose-users/b8839399- 0c51-42ed-98d3-69e63263137f% 40googlegroups.com.
petsc_options_value = 'lu'
petsc_options_iname = '-pc_type'
solve_type = PJFNK
Those setting in the executioner block worked. The simulation converged within a few non-linear iterations and a few linear iterations for each non-linear iteration.
petsc_options_value = 'lu'
petsc_options_iname = '-pc_type'
solve_type = FD
Those setting in the executioner block worked as well.
However, with
petsc_options_value = 'hypre boomeramg'
petsc_options_iname = '-pc_type -pc_hypre_type'
solve_type = PJFNK
The simulation stopped due to Linear solve did not converge due to DIVERGED_DTOL iterations 150
Much larger -ksp_gmres_restart value didn't work because the residual didn't decrease.
Shohei
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/285923a4-ed05-4a94-bd6d-b56a36dc28d8%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CANFcJrFsPNgt_wdDTtD%2BQJ6SuAP5WOcoQQVKv3aMoCVDedHWgg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/285923a4-ed05-4a94-bd6d-b56a36dc28d8%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CANFcJrFsPNgt_wdDTtD%2BQJ6SuAP5WOcoQQVKv3aMoCVDedHWgg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAK4PXd3L43D5mJ-pHQho9AoOF59B7%3DZQtSgZXwhQ5KJSCj_Wow%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/285923a4-ed05-4a94-bd6d-b56a36dc28d8%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CANFcJrFsPNgt_wdDTtD%2BQJ6SuAP5WOcoQQVKv3aMoCVDedHWgg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAK4PXd3L43D5mJ-pHQho9AoOF59B7%3DZQtSgZXwhQ5KJSCj_Wow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAHfiw0e_uxEHKYMTsP6uFDVevxcUCEhw2DgU2G9tevDzHkn7VQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/285923a4-ed05-4a94-bd6d-b56a36dc28d8%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CANFcJrFsPNgt_wdDTtD%2BQJ6SuAP5WOcoQQVKv3aMoCVDedHWgg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAK4PXd3L43D5mJ-pHQho9AoOF59B7%3DZQtSgZXwhQ5KJSCj_Wow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAHfiw0e_uxEHKYMTsP6uFDVevxcUCEhw2DgU2G9tevDzHkn7VQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAK4PXd1rA1AgkwZxk4Kc6mjjAOUv5JgLc_9gej8qznRWYWQNnw%40mail.gmail.com.
Shohei
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/285923a4-ed05-4a94-bd6d-b56a36dc28d8%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CANFcJrFsPNgt_wdDTtD%2BQJ6SuAP5WOcoQQVKv3aMoCVDedHWgg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAK4PXd3L43D5mJ-pHQho9AoOF59B7%3DZQtSgZXwhQ5KJSCj_Wow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAHfiw0e_uxEHKYMTsP6uFDVevxcUCEhw2DgU2G9tevDzHkn7VQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAK4PXd1rA1AgkwZxk4Kc6mjjAOUv5JgLc_9gej8qznRWYWQNnw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAHfiw0eFZPNVb3fT%2Bgb89DVzMAo9dd2Oknyr41SvuYKTfj8v4Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/285923a4-ed05-4a94-bd6d-b56a36dc28d8%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CANFcJrFsPNgt_wdDTtD%2BQJ6SuAP5WOcoQQVKv3aMoCVDedHWgg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAK4PXd3L43D5mJ-pHQho9AoOF59B7%3DZQtSgZXwhQ5KJSCj_Wow%40mail.gmail.com.
Fande,I will try the options. The documentation about ASM for Moose would be really great. Also should I specify sub preconditioner when I use ASM too?
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/722d09fa-1840-4ea1-9e24-7dfdbd293218%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/bac9b567-f4bc-4dad-9a73-15a2f134c454%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/bfea3c03-097d-46ea-9194-7ad06915b44e%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/7ba104ec-c166-4e85-81e6-85f3a0f74800%40googlegroups.com.
Shohei Ogawa
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/7ba104ec-c166-4e85-81e6-85f3a0f74800%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAHfiw0ctc4i%3DA32HMtNdGupTPiDao6bZ4mnAvvnScQ_Lmy8HUg%40mail.gmail.com.
5.7 Variational Inequalities
SNES can also solve variational inequalities with box constraints. That are nonlinear algebraic systems with additional inequality constraints on some or all of the variables: Lui <=ui <=Hui. Some or all of the lower bounds may be negative infinity (indicated to PETSc with SNES_VI_NINF) and some or all of the upper bounds may be infinity (indicated by SNES_VI_INF). The command
SNESVISetVariableBounds(SNES,Vec Lu,Vec Hu);
is used to indicate that one is solving a variational inequality. The option -snes_vi_monitor turns on extra monitoring of the active set associated with the bounds and -snes_vi_type allows selecting from several VI solvers, the default is preferred.
Long story short I talked to PETSc people, actually Dmitry Karpeyev back then, about options for constraining the variables to be positive and for reasonsI cannot exactly recall anymore he discouraged this approach quite strongly. Aside from that I doubt that there are the hooks in MOOSE and PETSc to reject certain variable states during the JFNK solve or constrain the attainable solution space, butI don't know enough to say this with certainty.
I set a constant damper instead of the bounding value damper. The constant value at 0.5 and 0.2 resulted in the negative value at the first non-linear iteration. 0.01 gave a positive value all over the domain, but it seems that the residual decrease is very slow.I found that PETSc has a solver setting for inequalities.The PETSc 3.9 document (page 145) says5.7 Variational Inequalities
SNES can also solve variational inequalities with box constraints. That are nonlinear algebraic systems with additional inequality constraints on some or all of the variables: Lui <=ui <=Hui. Some or all of the lower bounds may be negative infinity (indicated to PETSc with SNES_VI_NINF) and some or all of the upper bounds may be infinity (indicated by SNES_VI_INF). The command
SNESVISetVariableBounds(SNES,Vec Lu,Vec Hu);
is used to indicate that one is solving a variational inequality. The option -snes_vi_monitor turns on extra monitoring of the active set associated with the bounds and -snes_vi_type allows selecting from several VI solvers, the default is preferred.I am not sure if we can use this with Moose. In other words, I am not sure if it is possible to call this function via command line options.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/d5bbfb1c-2830-42a9-856a-bdc119d210bc%40googlegroups.com.
where c_O2 and c_H+ are the concentration of oxygen and proton. \eta is the overpotential of the reaction defined as:
\Psi_electrolyte is the electric potential appearing in the Poisson-Nernst-Planck equation.
Because of the log_e function, I am not sure what value should I return for the residual and Jacobian when the concentration is negative. Other than that I have correctly implemented the residual and Jacobian.
Shohei
where c_O2 and c_H+ are the concentration of oxygen and proton. \eta is the overpotential of the reaction defined as:
\Psi_electrolyte is the electric potential appearing in the Poisson-Nernst-Planck equation.
Because of the log_e function, I am not sure what value should I return for the residual and Jacobian when the concentration is negative. Other than that I have correctly implemented the residual and Jacobian.
Shohei
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/d5bbfb1c-2830-42a9-856a-bdc119d210bc%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/d5bbfb1c-2830-42a9-856a-bdc119d210bc%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CACOt%3DcUKZGjXhn8VyLBOikW%2Bz_x0UeCOwieq9huz3hv7BDKRRQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAFfxPjqCBwTC_z%3D372qdVrt3nHcugvujsj9O8Ny9hzg1-%2BgNqw%40mail.gmail.com.
Shohei
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/d5bbfb1c-2830-42a9-856a-bdc119d210bc%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CACOt%3DcUKZGjXhn8VyLBOikW%2Bz_x0UeCOwieq9huz3hv7BDKRRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAFfxPjqCBwTC_z%3D372qdVrt3nHcugvujsj9O8Ny9hzg1-%2BgNqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CAHfiw0eeHsyCd%3D7MSL4Cs7VMk%2Bj5%2BqOXp6FFG7R4Ch3x5H5SHg%40mail.gmail.com.
[c_O2_positive_damper]
type = BoundingValueNodalDamper
min_value = 1e-16
variable = c_O2
max_value = 1e10
min_damping = -1e4
[]
Also, should I specify specific line search methods?
With line_search = 'bt' for example, the concentration actually got negative even with the dumper.
Thank you,
Shohei
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CABk6%3D%2BbEpAUohS8V6HB8FgmaiNMKDLVHhx7067aXjxhnUwMsdw%40mail.gmail.com.