Commit 900acb8b authored by Douglas Serson's avatar Douglas Serson

Merge branch 'fix/IncNS_AdvField' into 'master'

Fixed an error where the auxiliary field was not initialised in the Incompressible flow solver

See merge request !779
parents cf54567c ae888f57
...@@ -36,6 +36,9 @@ v4.4.1 ...@@ -36,6 +36,9 @@ v4.4.1
- Add manifold meshing option (!756) - Add manifold meshing option (!756)
- Fix issue with older rea input files (!765) - Fix issue with older rea input files (!765)
**IncNavierStokesSolver**
- Fix an initialisation issue when using an additional advective field (!779)
v4.4.0 v4.4.0
------ ------
**Library**: **Library**:
......
...@@ -54,6 +54,7 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES ) ...@@ -54,6 +54,7 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES )
ADD_NEKTAR_TEST(ChanFlow_m8_singular) ADD_NEKTAR_TEST(ChanFlow_m8_singular)
ADD_NEKTAR_TEST(ChanFlow_V8P7_Avg) ADD_NEKTAR_TEST(ChanFlow_V8P7_Avg)
ADD_NEKTAR_TEST(Channel_Flow_3modes_rad) ADD_NEKTAR_TEST(Channel_Flow_3modes_rad)
ADD_NEKTAR_TEST(channelTemp)
ADD_NEKTAR_TEST(Couette_3DH2D_MVM) ADD_NEKTAR_TEST(Couette_3DH2D_MVM)
ADD_NEKTAR_TEST(Hex_channel_m3) ADD_NEKTAR_TEST(Hex_channel_m3)
ADD_NEKTAR_TEST(Hex_channel_varP) ADD_NEKTAR_TEST(Hex_channel_varP)
......
...@@ -407,14 +407,24 @@ namespace Nektar ...@@ -407,14 +407,24 @@ namespace Nektar
int nvel = m_velocity.num_elements(); int nvel = m_velocity.num_elements();
if(nvel == 2) 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 else
{ {
m_pressure->PhysDeriv(m_pressure->GetPhys(), Forcing[0], m_pressure->PhysDeriv(m_pressure->GetPhys(),
Forcing[1], Forcing[2]); 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 // Subtract inarray/(aii_dt) and divide by kinvis. Kinvis will
// need to be updated for the convected fields. // need to be updated for the convected fields.
for(int i = 0; i < m_nConvectiveFields; ++i) 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