ADRSolver epsilon value defaults to 1.0
Hi All, I am trying to use ADR solver to run unsteady-advection diffusion reaction with epsilon value set to 0.01. But the simulation always defaults to 1.0. I changed epsilon value to 1.0,0.5 0.01. The end result is always the same (as if epsilon=1.0). Please let me know if anyone has encountered this issue or knows how to fix this bug. I have added the script files to reproduce this issue. Cheers, Ashok.
Hi, Ashok There is a typing error in your file Conditions_unsteadyConvectionDom.xml in line 56, you type "epsion" there instead of "epsilon", this may be the reason. Ankang -----原始邮件----- 发件人:"ashok jallepalli" <ash.nani@gmail.com> 发送时间:2017-09-03 12:05:25 (星期日) 收件人: nektar-users <nektar-users@imperial.ac.uk>, "<nektar-developers@sci.utah.edu>" <nektar-developers@sci.utah.edu> 抄送: 主题: [Nektar-users] ADRSolver epsilon value defaults to 1.0 Hi All, I am trying to use ADR solver to run unsteady-advection diffusion reaction with epsilon value set to 0.01. But the simulation always defaults to 1.0. I changed epsilon value to 1.0,0.5 0.01. The end result is always the same (as if epsilon=1.0). Please let me know if anyone has encountered this issue or knows how to fix this bug. I have added the script files to reproduce this issue. Cheers, Ashok.
Thanks Ankang for looking into the issue, I have removed the variable epsilon in line 56. The results still have a probelm. changed to 55 <FUNCTION NAME="ExactSolution"> 56 <E VAR="u" VALUE="exp(-2.0*FinTime)*sin(x)*sin(y)" /> 57 </FUNCTION>" The error result are same for epsilon values 1.0, 0.5 and 0.01. I have also attached result for .vtu file of the result (which is same for all the three values of epsilon). The highest value = 0.019 /approx e^(-2.0*2*1.0). Results Writing: "P4_codesquare11_2.chk" (0s, XML) Time-integration : 145.194s Writing: "P4_codesquare11.fld" (0s, XML) ------------------------------------------- Total Computation Time = 149s ------------------------------------------- L 2 error (variable u) : 0.148193 L inf error (variable u) : 0.018095 Cheers, Ashok. On Sat, Sep 2, 2017 at 10:48 PM, Ankang Gao <gaoak@pku.edu.cn> wrote:
Hi, Ashok
There is a typing error in your file Conditions_unsteadyConvectionDom.xml in line 56, you type "epsion" there instead of "epsilon", this may be the reason.
Ankang
-----原始邮件----- *发件人:*"ashok jallepalli" <ash.nani@gmail.com> *发送时间:*2017-09-03 12:05:25 (星期日) *收件人:* nektar-users <nektar-users@imperial.ac.uk>, "< nektar-developers@sci.utah.edu>" <nektar-developers@sci.utah.edu> *抄送:* *主题:* [Nektar-users] ADRSolver epsilon value defaults to 1.0
Hi All, I am trying to use ADR solver to run unsteady-advection diffusion reaction with epsilon value set to 0.01. But the simulation always defaults to 1.0.
I changed epsilon value to 1.0,0.5 0.01. The end result is always the same (as if epsilon=1.0). Please let me know if anyone has encountered this issue or knows how to fix this bug.
I have added the script files to reproduce this issue.
Cheers, Ashok.
Hi, Ashok I checked the code and find that m_epsilon is not multiplied to diffusion term in this function: void Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(const Array<OneD, const Array<OneD, NekDouble > > & inarray, Array< OneD, Array< OneD, NekDouble > > & outarray, const NekDouble time) in file "UnsteadyAdvectionDiffusion.cpp". This is equivalent to set epsilon to 1, so I think you are right. I added a new line between line 273 and 274 to multiply m_epsilon to diffusion term, like this 272 for (int i = 0; i < nVariables; ++i) 273 { 274 Vmath::Smul(nSolutionPts, m_epsilon, &outarrayDiff[i][0], 1, 275 &outarrayDiff[i][0], 1); 276 Vmath::Vadd(nSolutionPts, &outarray[i][0], 1, 277 &outarrayDiff[i][0], 1, &outarray[i][0], 1); 278 } and the code returns right results. Ankang -----原始邮件----- 发件人:"ashok jallepalli" <ash.nani@gmail.com> 发送时间:2017-09-03 13:37:51 (星期日) 收件人: "Ankang Gao" <gaoak@pku.edu.cn> 抄送: nektar-users <nektar-users@imperial.ac.uk> 主题: Re: [Nektar-users] ADRSolver epsilon value defaults to 1.0 Thanks Ankang for looking into the issue, I have removed the variable epsilon in line 56. The results still have a probelm. changed to 55 <FUNCTION NAME="ExactSolution"> 56 <E VAR="u"VALUE="exp(-2.0*FinTime)*sin(x)*sin(y)" /> 57 </FUNCTION>" The error result are same for epsilon values 1.0, 0.5 and 0.01. I have also attached result for .vtu file of the result (which is same for all the three values of epsilon). The highest value = 0.019 /approx e^(-2.0*2*1.0). Results Writing: "P4_codesquare11_2.chk" (0s, XML) Time-integration : 145.194s Writing: "P4_codesquare11.fld" (0s, XML) ------------------------------------------- Total Computation Time = 149s ------------------------------------------- L 2 error (variable u) : 0.148193 L inf error (variable u) : 0.018095 Cheers, Ashok. On Sat, Sep 2, 2017 at 10:48 PM, Ankang Gao <gaoak@pku.edu.cn> wrote: Hi, Ashok There is a typing error in your file Conditions_unsteadyConvectionDom.xml in line 56, you type "epsion" there instead of "epsilon", this may be the reason. Ankang -----原始邮件----- 发件人:"ashok jallepalli" <ash.nani@gmail.com> 发送时间:2017-09-03 12:05:25 (星期日) 收件人: nektar-users <nektar-users@imperial.ac.uk>, "<nektar-developers@sci.utah.edu>" <nektar-developers@sci.utah.edu> 抄送: 主题: [Nektar-users] ADRSolver epsilon value defaults to 1.0 Hi All, I am trying to use ADR solver to run unsteady-advection diffusion reaction with epsilon value set to 0.01. But the simulation always defaults to 1.0. I changed epsilon value to 1.0,0.5 0.01. The end result is always the same (as if epsilon=1.0). Please let me know if anyone has encountered this issue or knows how to fix this bug. I have added the script files to reproduce this issue. Cheers, Ashok.
Thank you Ankang, Your fix worked :) Hi David, Ankang has a fix for the bug, I reported for. Please let me know if I can do anything to help get the bug fixed in next version of Nektar. I have verified that this bug exists in the latest Nektar branch also. http://doc.nektar.info/doxygen/latest/_unsteady_advection_diffusion_8cpp_sou... Line Number: 273 Cheers, Ashok. On Sun, Sep 3, 2017 at 2:12 AM, Ankang Gao <gaoak@pku.edu.cn> wrote:
Hi, Ashok
I checked the code and find that m_epsilon is not multiplied to diffusion term in this function: void Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(const Array<OneD, const Array<OneD, NekDouble > > & inarray, Array< OneD, Array< OneD, NekDouble > > & outarray, const NekDouble time) in file "UnsteadyAdvectionDiffusion.cpp". This is equivalent to set epsilon to 1, so I think you are right.
I added a new line between line 273 and 274 to multiply m_epsilon to diffusion term, like this 272 for (int i = 0; i < nVariables; ++i) 273 { 274 Vmath::Smul(nSolutionPts, m_epsilon, &outarrayDiff[i][0], 1, 275 &outarrayDiff[i][0], 1); 276 Vmath::Vadd(nSolutionPts, &outarray[i][0], 1, 277 &outarrayDiff[i][0], 1, &outarray[i][0], 1); 278 }
and the code returns right results.
Ankang
-----原始邮件----- *发件人:*"ashok jallepalli" <ash.nani@gmail.com> *发送时间:*2017-09-03 13:37:51 (星期日) *收件人:* "Ankang Gao" <gaoak@pku.edu.cn> *抄送:* nektar-users <nektar-users@imperial.ac.uk> *主题:* Re: [Nektar-users] ADRSolver epsilon value defaults to 1.0
Thanks Ankang for looking into the issue, I have removed the variable epsilon in line 56. The results still have a probelm.
changed to 55 <FUNCTION NAME="ExactSolution">
56 <E VAR="u" VALUE="exp(-2.0*FinTime)*sin(x)*sin(y)" /> 57 </FUNCTION>"
The error result are same for epsilon values 1.0, 0.5 and 0.01. I have also attached result for .vtu file of the result (which is same for all the three values of epsilon). The highest value = 0.019 /approx e^(-2.0*2*1.0).
Results
Writing: "P4_codesquare11_2.chk" (0s, XML)
Time-integration : 145.194s
Writing: "P4_codesquare11.fld" (0s, XML)
-------------------------------------------
Total Computation Time = 149s
-------------------------------------------
L 2 error (variable u) : 0.148193
L inf error (variable u) : 0.018095
Cheers,
Ashok.
On Sat, Sep 2, 2017 at 10:48 PM, Ankang Gao <gaoak@pku.edu.cn> wrote:
Hi, Ashok
There is a typing error in your file Conditions_unsteadyConvectionDom.xml in line 56, you type "epsion" there instead of "epsilon", this may be the reason.
Ankang
-----原始邮件----- *发件人:*"ashok jallepalli" <ash.nani@gmail.com> *发送时间:*2017-09-03 12:05:25 (星期日) *收件人:* nektar-users <nektar-users@imperial.ac.uk>, "< nektar-developers@sci.utah.edu>" <nektar-developers@sci.utah.edu> *抄送:* *主题:* [Nektar-users] ADRSolver epsilon value defaults to 1.0
Hi All, I am trying to use ADR solver to run unsteady-advection diffusion reaction with epsilon value set to 0.01. But the simulation always defaults to 1.0.
I changed epsilon value to 1.0,0.5 0.01. The end result is always the same (as if epsilon=1.0). Please let me know if anyone has encountered this issue or knows how to fix this bug.
I have added the script files to reproduce this issue.
Cheers, Ashok.
participants (2)
- 
                
                Ankang Gao
- 
                
                ashok jallepalli