Time Solver

27 views
Skip to first unread message
Assigned to inz.karol...@gmail.com by lik...@wp.pl

Joshua Gorham

unread,
Nov 1, 2021, 6:55:38 PM11/1/21
to MoFEM Q&A

Hi all, I am trying to solve the time dependant coupled equations displayed below:

Picture 1.png 

(The time derivative is passed via the LT Submatrix)

 

I am currently getting issues with time solvers and when running the code, it produces this error:

error.png

I have modified the operator to admit a lambda function:

lambda fun.png

OpDomainPVMixScalarTimesDiv is an alias for OpMixScalarTimesGrad:

alias.png

This operator has been changed in the core level, and now looks like this:

Core edit.png

The time manager function that I have used is:

Time solver.png

The Command line that I use is:

 

mpirun -np 1 ./hydromechanics_time_dependant -file_name simple_square.cub ksp -ksp_monitor -density 0.0509684 -order_pressure 1 -prescribed_pressure_1 -10 -prescribed_pressure_2 -10 -conductivity 10 -water_table -100 -unit_weight 0 -ts_monitor -ts_dt 1 -ts_max_time 1 -ts_type beuler -ksp_type gmres -pc_type lu -pc_factor_mat_solver_type mumps -snes_monitor -snes_monitor -snes_max_it 1

 

 All the best,

Josh

Karol Lewandowski

unread,
Nov 1, 2021, 7:31:32 PM11/1/21
to MoFEM Q&A
I do not really see the error here, it seems like it is diverging. Can you try running with "-ts_adapt_type none"
Also, have you verified your jacobian matrix? 
I suggest maybe running an extremely small problem with a minimum number of elements and "-snes_fd" parameter. It will use the finite difference method for Jacobian.

Lukasz Kaczmraczyk

unread,
Nov 6, 2021, 6:45:04 PM11/6/21
to MoFEM Q&A

Josh, 

That should converge in one step. I would strat with switching off line searcher, add this to param_file.petsc, or command line,

-snes_linesearch_type basic

Your error is related to inconstancy between the right hand side, and the left hand side, so Karol suggestion is good.  Try 

-snes_fd 

and check if you get expected results. If that is the case, you should look at opertaors pushed to calculate matrix, i..e the left hand side.

L.
Reply all
Reply to author
Forward
0 new messages