Find answers, ask questions, and connect with our <br>community around the world.

Home Forums CFD foundation course: Forum Lesson 10 – Programming 2D diffusion problem

• # Lesson 10 – Programming 2D diffusion problem

Posted by on January 26, 2023 at 8:40 am

The formula used in the video for error calculation for the convergence criteria is as given below

Shouldn’t it beÂ  err = max(max(abs(T-T_old)))?

Because if the max function is applied first to the matrix(T – T_old), a row with highest positive values comes out as a result. Out of these values, once again the highest of them is chosen. After this the abs function is applied.

So if there was a negative value in the matrix(T-T_old), whose magnitude was greater than that of the highest positive value, that gets neglected. So the highest error on the negative side goes unchecked here.

Please correct me if I am wrong.

replied 1 year, 2 months ago 2 Members · 1 Reply
• ### Rahul

Member
February 7, 2023 at 1:55 pm

Hi Srinidhi,

Thank you for pointing out the error regarding this. As you have mentioned, using this code, only the maximum positive value of the error is considered while calculating the error. We will make modifications in the corresponding video or add the error as a note so that students can be aware of this while watching the lesson.

Best regards

Flowthermolab support team