Numerical convergence problem

A discussion forum for Hydrus-1D users.
Post Reply
rajsekhar
Posts: 21
Joined: Thu Nov 29, 2018 5:58 am
Location: India

Numerical convergence problem

Post by rajsekhar » Tue Sep 03, 2019 7:07 pm

Dear Sir,

Sometimes HYDRUS does not stop on its own after showing the error i.e. numerical solution not converged! even if I have not checked the option Hit enter at the end. Please help me regarding this issue.

Jirka
Posts: 4827
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Re: Numerical convergence problem

Post by Jirka » Tue Sep 03, 2019 10:47 pm

Since the Richards equation is a highly nonlinear equation, there is always a chance that the numerical solution will not converge. However, for physically realistic problems, this should be rather rate. J.

rajsekhar
Posts: 21
Joined: Thu Nov 29, 2018 5:58 am
Location: India

Re: Numerical convergence problem

Post by rajsekhar » Wed Sep 04, 2019 5:30 am

Dear Sir,

My issue is not with the non-convergence of the simulation, the problem is sometimes it does not stops on its own after showing the error, I need to forced stop it. I am attaching the image which shows the problem I am facing.

Thank you
K Rajsekhar
Attachments
HYDRUS image.JPG
HYDRUS image.JPG (67.38 KiB) Viewed 1345 times

Jirka
Posts: 4827
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Re: Numerical convergence problem

Post by Jirka » Sat Sep 07, 2019 11:49 am

I would need to see your project. However, I would not have time to look at it until the end of September as I’m currently traveling in Himachal Pradesh, India. J.

rajsekhar
Posts: 21
Joined: Thu Nov 29, 2018 5:58 am
Location: India

Re: Numerical convergence problem

Post by rajsekhar » Tue Sep 10, 2019 7:17 pm

Dear Sir,

I have attached my project, please check it. And have a happy stay in INDIA. If you have time do please visit IISc Bangalore. I am doing PhD under prof. Sekhar Muddu in IISc. I guess you visited IISc long back for a short course on HYDRUS.
Attachments
daily.rar
(513 Bytes) Downloaded 16 times

rajsekhar
Posts: 21
Joined: Thu Nov 29, 2018 5:58 am
Location: India

Re: Numerical convergence problem

Post by rajsekhar » Wed Sep 11, 2019 11:46 am

Dear Sir,

Please check this attachment, in the earlier attachment forgot to add some files.
Attachments
daily.rar
(16.45 KiB) Downloaded 13 times

rajsekhar
Posts: 21
Joined: Thu Nov 29, 2018 5:58 am
Location: India

Re: Numerical convergence problem

Post by rajsekhar » Fri Sep 13, 2019 5:36 am

Dear Sir,

what I realized is when the head is less than -10000000 the above problem arises i.e. hydrus doesnot stop after showing the error. Don't know how to tackle this issue.

rajsekhar
Posts: 21
Joined: Thu Nov 29, 2018 5:58 am
Location: India

Re: Numerical convergence problem

Post by rajsekhar » Fri Sep 13, 2019 6:29 am

Dear Sir,

Issue is resolved. Actually the problem was with hCritA, as I fixed the hCritA to 15000 and for n=1.05 h values are around 10e+20.

rajsekhar
Posts: 21
Joined: Thu Nov 29, 2018 5:58 am
Location: India

Re: Numerical convergence problem

Post by rajsekhar » Wed Oct 16, 2019 5:47 am

Dear Sir,

The problem still persists. The issue is, if the solution is not converged it should stop, but in my case it is going into infinite loop with all NaN values. Please help me fixing the issue. In the attachments, I have enclosed the project with name daily and also my executable. As an example I have taken n=1.05, which is creating the issue, but in my Monte Carlo simulations different combination of parameters create the same issue. So, what I want is when the solution is not converged, it should stop and not go to infinite loop.

Thank you
Rajsekhar
Attachments
daily.rar
(528.26 KiB) Downloaded 13 times

rajsekhar
Posts: 21
Joined: Thu Nov 29, 2018 5:58 am
Location: India

Re: Numerical convergence problem

Post by rajsekhar » Wed Oct 16, 2019 7:22 am

Dear Sir,

I have attached the screen shot of the simulation runs of two settings. One with max no of iterations=10 and other with max no of iterations=3. when I choose max no of iterations=10, the simulation is not stopping after convergence issue, but with the option max no of iterations=3, after convergence issue the simulation stops. I want my simulation to stop after the convergence issue with max no of iterations=10.

Thank you.
Attachments
max_no_of_iterations=10.JPG
max_no_of_iterations=10.JPG (94.66 KiB) Viewed 588 times
max_no_of_iterations=3.JPG
max_no_of_iterations=3.JPG (89.47 KiB) Viewed 588 times

rajsekhar
Posts: 21
Joined: Thu Nov 29, 2018 5:58 am
Location: India

Re: Numerical convergence problem

Post by rajsekhar » Wed Oct 16, 2019 2:57 pm

Dear Sir,

It is happening for energy balance boundary condition only. For Penmann-Monteith equation it is working fine, that is after non-convergence it is automatically stopping. But in my work I am using energy balance BC, so want the simulation to stop after non-convergence.

Jirka
Posts: 4827
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Re: Numerical convergence problem

Post by Jirka » Wed Oct 16, 2019 5:04 pm

You like use some unrealistic combination of parameters, which somewhere apparently leads to a division by zero, which leads to NaN (standing for not a number, is a member of a numeric data type that can be interpreted as a value that is undefined or unrepresentable, especially in floating-point arithmetic). I do not know how to help with that. J.

rajsekhar
Posts: 21
Joined: Thu Nov 29, 2018 5:58 am
Location: India

Re: Numerical convergence problem

Post by rajsekhar » Fri Oct 18, 2019 4:59 am

Dear Sir,

Sorry for bothering you. But, is there a way to stop the simulation automatically when there is a NaN value. I mean in the code itself, if there is a NaN value, the code will detect the NaN and stops automatically.

Jirka
Posts: 4827
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Re: Numerical convergence problem

Post by Jirka » Fri Oct 18, 2019 5:50 pm

I wish I knew how to do it in the Intel compiler. J.

Post Reply