Commit c1f6f874 authored by Spencer Sherwin's avatar Spencer Sherwin
Browse files

Fixed an error where the auxiliary field was not initialised in the...

Fixed an error where the auxiliary field was not initialised in the Incompressible NavierStokes solver. Added a regression test so that an auxiliary field is used
parent e9280d9c
......@@ -53,6 +53,7 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES )
ADD_NEKTAR_TEST(ChanFlow_m8_BodyForce)
ADD_NEKTAR_TEST(ChanFlow_m8_singular)
ADD_NEKTAR_TEST(Channel_Flow_3modes_rad)
ADD_NEKTAR_TEST(channelTemp)
ADD_NEKTAR_TEST(Couette_3DH2D_MVM)
ADD_NEKTAR_TEST(Hex_channel_m3)
ADD_NEKTAR_TEST(Hex_channel_varP)
......
......@@ -407,14 +407,24 @@ namespace Nektar
int nvel = m_velocity.num_elements();
if(nvel == 2)
{
m_pressure->PhysDeriv(m_pressure->GetPhys(), Forcing[0], Forcing[1]);
m_pressure->PhysDeriv(m_pressure->GetPhys(),
Forcing[m_velocity[0]],
Forcing[m_velocity[1]]);
}
else
{
m_pressure->PhysDeriv(m_pressure->GetPhys(), Forcing[0],
Forcing[1], Forcing[2]);
m_pressure->PhysDeriv(m_pressure->GetPhys(),
Forcing[m_velocity[0]],
Forcing[m_velocity[1]],
Forcing[m_velocity[2]]);
}
// zero convective fields.
for(int i = nvel; i < m_nConvectiveFields; ++i)
{
Vmath::Zero(phystot,Forcing[i],1);
}
// Subtract inarray/(aii_dt) and divide by kinvis. Kinvis will
// need to be updated for the convected fields.
for(int i = 0; i < m_nConvectiveFields; ++i)
......
<?xml version="1.0" encoding="utf-8"?>
<test>
<description>Channel Flow P=4 with temperature field</description>
<executable>IncNavierStokesSolver</executable>
<parameters>channelTemp.xml</parameters>
<files>
<file description="Session File">channelTemp.xml</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-10">8.82097e-07</value>
<value variable="v" tolerance="1e-10">1.56407e-07</value>
<value variable="c1"tolerance="1e-4"> 1.02325</value>
<value variable="p" tolerance="1e-3"> 0.048 </value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-8">1.12525e-05</value>
<value variable="v" tolerance="1e-8">1.31727e-06</value>
<value variable="c1"tolerance="1e-4">0.947434</value>
<value variable="p" tolerance="1e-4">0.0240083</value>
</metric>
</metrics>
</test>
This diff is collapsed.
Markdown is supported
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