Skip to content

ADRSolver epsilon value defaults to 1.0

ADR solver when used to run unsteady-advection diffusion reaction with Epsilon value set to 0.01. The simulation always defaults to 1.0.

Description The error result is 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 = e^(-2.021.0).

Results

L 2 error (variable u) : 0.148193

L inf error (variable u) : 0.018095

P4_codesquare11.vtu Conditions_unsteadyConvectionDom.xml P4_codesquare11.xml

FIX: suggested by Ankang Gao (gaoak@pku.edu.cn)

The fix for this bug is to change the following lines in the file. FILE: UnsteadyAdvectionDiffusion.cpp

Function: void Nektar::UnsteadyAdvectionDiffusion::DoOdeRhs(const Array<OneD, const Array<OneD, NekDouble > > & inarray, Array< OneD, Array< OneD, NekDouble > > & outarray, const NekDouble time)

Line is added 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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information