Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • Nektar Nektar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 84
    • Issues 84
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 41
    • Merge requests 41
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Nektar
  • NektarNektar
  • Issues
  • #62

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
Assignee
Assign to
Time tracking