Commit 3f12b281 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Merge branch 'ticket/62-ADR-epsilon' into 'master'

Fix UnsteadyAdvectionDiffusion with DG

Closes #62

See merge request !855
parents 9d6c6599 967a47c0
......@@ -102,6 +102,9 @@ v4.4.1
**Packaging**
- Added missing package for FieldUtils library (!755)
**ADRSolver:**
- Fix UnsteadyAdvectionDiffusion with DG (!855)
v4.4.0
------
**Library**:
......
......@@ -79,6 +79,9 @@ IF( NEKTAR_SOLVER_ADR )
# 2D advection diffusion (Imex DG)
ADD_NEKTAR_TEST(UnsteadyAdvectionDiffusion_2D_ImexDG)
# 2D advection diffusion (Weak DG)
ADD_NEKTAR_TEST(UnsteadyAdvectionDiffusion_2D_WeakDG)
# 3D discontinous advection
ADD_NEKTAR_TEST(Advection3D_m12_DG_hex_periodic_nodal LENGTHY)
ADD_NEKTAR_TEST(Advection3D_m12_DG_hex_nodal)
......
......@@ -271,8 +271,9 @@ namespace Nektar
for (int i = 0; i < nVariables; ++i)
{
Vmath::Vadd(nSolutionPts, &outarray[i][0], 1,
&outarrayDiff[i][0], 1, &outarray[i][0], 1);
Vmath::Svtvp(nSolutionPts, m_epsilon, &outarrayDiff[i][0], 1,
&outarray[i][0], 1,
&outarray[i][0], 1);
}
}
......
<?xml version="1.0" encoding="utf-8"?>
<test>
<description>2D Advection-Diffusion with WeakDG (epsilon = 0.5)</description>
<executable>ADRSolver</executable>
<parameters>UnsteadyAdvectionDiffusion_2D_WeakDG.xml</parameters>
<files>
<file description="Session File">UnsteadyAdvectionDiffusion_2D_WeakDG.xml</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-08">3.087e-08</value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-08">1.46935e-07</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<NEKTAR>
<GEOMETRY DIM="2" SPACE="2">
<VERTEX>
<V ID="0">-1.00000000e+00 1.00000000e+00 0.00000000e+00</V>
<V ID="1">-1.00000000e+00 2.75024448e-12 0.00000000e+00</V>
<V ID="2">-2.75024448e-12 7.56417896e-24 0.00000000e+00</V>
<V ID="3">-2.75024448e-12 1.00000000e+00 0.00000000e+00</V>
<V ID="4">1.00000000e+00 -2.75024448e-12 0.00000000e+00</V>
<V ID="5">1.00000000e+00 1.00000000e+00 0.00000000e+00</V>
<V ID="6">-1.00000000e+00 -1.00000000e+00 0.00000000e+00</V>
<V ID="7">-2.75024448e-12 -1.00000000e+00 0.00000000e+00</V>
<V ID="8">1.00000000e+00 -1.00000000e+00 0.00000000e+00</V>
</VERTEX>
<EDGE>
<E ID="0"> 0 1 </E>
<E ID="1"> 1 2 </E>
<E ID="2"> 2 3 </E>
<E ID="3"> 3 0 </E>
<E ID="4"> 2 4 </E>
<E ID="5"> 4 5 </E>
<E ID="6"> 5 3 </E>
<E ID="7"> 1 6 </E>
<E ID="8"> 6 7 </E>
<E ID="9"> 7 2 </E>
<E ID="10"> 7 8 </E>
<E ID="11"> 8 4 </E>
</EDGE>
<ELEMENT>
<Q ID="0"> 0 1 2 3 </Q>
<Q ID="1"> 2 4 5 6 </Q>
<Q ID="2"> 7 8 9 1 </Q>
<Q ID="3"> 9 10 11 4 </Q>
</ELEMENT>
<COMPOSITE>
<C ID="0"> Q[0-3] </C>
<C ID="1"> E[8,10] </C>
<C ID="2"> E[11,5] </C>
<C ID="3"> E[3,6] </C>
<C ID="4"> E[0,7] </C>
</COMPOSITE>
<DOMAIN> C[0] </DOMAIN>
</GEOMETRY>
<EXPANSIONS>
<E COMPOSITE="C[0]" FIELDS="u" TYPE="MODIFIED" NUMMODES="9"/>
</EXPANSIONS>
<CONDITIONS>
<SOLVERINFO>
<I PROPERTY="EQTYPE" VALUE="UnsteadyAdvectionDiffusion" />
<I PROPERTY="Projection" VALUE="DisContinuous" />
<I PROPERTY="AdvectionAdvancement" VALUE="Explicit" />
<I PROPERTY="AdvectionType" VALUE="WeakDG" />
<I PROPERTY="DiffusionAdvancement" VALUE="Explicit" />
<I PROPERTY="TimeIntegrationMethod" VALUE="ClassicalRungeKutta4" />
<I PROPERTY="UpwindType" VALUE="Upwind" />
</SOLVERINFO>
<PARAMETERS>
<P> TimeStep = 1.0e-04 </P>
<P> NumSteps = 1000 </P>
<P> IO_InfoSteps = 1000 </P>
<P> wavefreq = PI </P>
<P> epsilon = 0.5 </P>
<P> ax = 20.0 </P>
<P> ay = 20.0 </P>
</PARAMETERS>
<VARIABLES>
<V ID="0"> u </V>
</VARIABLES>
<BOUNDARYREGIONS>
<B ID="0"> C[1] </B>
<B ID="1"> C[2] </B>
<B ID="2"> C[3] </B>
<B ID="3"> C[4] </B>
</BOUNDARYREGIONS>
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="u" USERDEFINEDTYPE="TimeDependent"
VALUE="exp(-2.0*wavefreq*wavefreq*epsilon*t)*sin(wavefreq*(x-ax*t))*sin(wavefreq*(y-ay*t))" />
</REGION>
<REGION REF="1">
<D VAR="u" USERDEFINEDTYPE="TimeDependent"
VALUE="exp(-2.0*wavefreq*wavefreq*epsilon*t)*sin(wavefreq*(x-ax*t))*sin(wavefreq*(y-ay*t))" />
</REGION>
<REGION REF="2">
<D VAR="u" USERDEFINEDTYPE="TimeDependent"
VALUE="exp(-2.0*wavefreq*wavefreq*epsilon*t)*sin(wavefreq*(x-ax*t))*sin(wavefreq*(y-ay*t))" />
</REGION>
<REGION REF="3">
<D VAR="u" USERDEFINEDTYPE="TimeDependent"
VALUE="exp(-2.0*wavefreq*wavefreq*epsilon*t)*sin(wavefreq*(x-ax*t))*sin(wavefreq*(y-ay*t))" />
</REGION>
</BOUNDARYCONDITIONS>
<FUNCTION NAME="AdvectionVelocity">
<E VAR="Vx" VALUE="ax" />
<E VAR="Vy" VALUE="ay" />
</FUNCTION>
<FUNCTION NAME="InitialConditions">
<E VAR="u" VALUE="sin(wavefreq*x)*sin(wavefreq*y)" />
</FUNCTION>
<FUNCTION NAME="ExactSolution">
<E VAR="u" VALUE="exp(-2.0*wavefreq*wavefreq*epsilon*t)*sin(wavefreq*(x-ax*t))*sin(wavefreq*(y-ay*t))" />
</FUNCTION>
</CONDITIONS>
</NEKTAR>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment