You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem here should be a LinearProblem instead of nonlinear.
The following changes should be done
defpost_processing_solution_to_concentration(self):
"""Converts the post_processing_solution from theta to mobile concentration. c = theta * S. The attribute post_processing_solution is fenics.Product (if self.S is festim.ArheniusCoeff) """problem=f.LinearVariationalProblem(f.lhs(self.form_post_processing), f.rhs(self.form_post_processing), self.post_processing_solution, [])
solver=f.LinearVariationalSolver(problem)
solver.solve()
defcreate_form_post_processing(self, V, materials, dx):
F=0v=f.TestFunction(V)
self.post_processing_solution=f.TrialFunction(V)
F+=-self.post_processing_solution*v*dxformatinmaterials.materials:
ifmat.solubility_law=="sievert":
F+=self.solution*self.S*v*dx(mat.id)
elifmat.solubility_law=="henry":
F+=self.solution**2*self.S*v*dx(mat.id)
self.form_post_processing=Fself.post_processing_solution=f.Function(V)
The text was updated successfully, but these errors were encountered:
https://github.com/RemDelaporteMathurin/FESTIM/blob/5e710594217d05156e9fd947897b86eb0f9d0b76/festim/concentration/theta.py#L84-L101
The problem here should be a LinearProblem instead of nonlinear.
The following changes should be done
The text was updated successfully, but these errors were encountered: