Commit 48e2a25e authored by Douglas Serson's avatar Douglas Serson
Browse files

Add tests for mappings

parent ea0987cc
......@@ -91,6 +91,8 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES )
ADD_NEKTAR_TEST(ChanFlow_3DH2D_FFT)
ADD_NEKTAR_TEST(CylFlow_MovBody)
ADD_NEKTAR_TEST(KovaFlow_3DH1D_MVM_FFTW_Consistency)
ADD_NEKTAR_TEST(KovaFlow_3DH1D_P8_16modes_Mapping-explicit)
ADD_NEKTAR_TEST(KovaFlow_3DH1D_P8_16modes_Mapping-implicit)
ENDIF (NEKTAR_USE_FFTW)
IF (NEKTAR_USE_MPI)
......
<?xml version="1.0" encoding="utf-8"?>
<test>
<description>Kovasznay Flow 3D homogeneous 1D, P=8, 16 Fourier modes, using explicit mapping</description>
<executable>IncNavierStokesSolver</executable>
<parameters>KovaFlow_3DH1D_P8_16modes_Mapping-explicit.xml</parameters>
<files>
<file description="Session File">KovaFlow_3DH1D_P8_16modes_Mapping-explicit.xml</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-9">1.46561e-05</value>
<value variable="v" tolerance="1e-9">1.25542e-08</value>
<value variable="w" tolerance="1e-9">1.08398e-07</value>
<value variable="p" tolerance="1e-9">1.08737e-06</value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-9">1.64559e-05</value>
<value variable="v" tolerance="1e-9">2.01086e-07</value>
<value variable="w" tolerance="1e-9">3.48699e-07</value>
<value variable="p" tolerance="1e-9">8.00656e-06</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<NEKTAR xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.nektar.info/schema/nektar.xsd">
<EXPANSIONS>
<E COMPOSITE="C[0]" NUMMODES="8" FIELDS="u,v,w,p" TYPE="MODIFIED" />
</EXPANSIONS>
<CONDITIONS>
<SOLVERINFO>
<I PROPERTY="SolverType" VALUE="VCSMapping" />
<I PROPERTY="EQTYPE" VALUE="UnsteadyNavierStokes" />
<I PROPERTY="AdvectionForm" VALUE="Convective" />
<I PROPERTY="Projection" VALUE="Galerkin" />
<I PROPERTY="TimeIntegrationMethod" VALUE="IMEXOrder1" />
<I PROPERTY="HOMOGENEOUS" VALUE="1D" />
<I PROPERTY="GlobalSysSoln" VALUE="DirectMultiLevelStaticCond"/>
<I PROPERTY="USEFFT" VALUE="FFTW"/>
</SOLVERINFO>
<PARAMETERS>
<P> TimeStep = 0.001 </P>
<P> NumSteps = 10</P>
<P> IO_CheckSteps = NumSteps </P>
<P> IO_CFLSteps = 100 </P>
<P> IO_InfoSteps = 100 </P>
<P> Re = 40.0 </P>
<P> Kinvis = 1/Re </P>
<P> HomModesZ = 16 </P>
<P> LZ = 2.0 </P>
<P> wavyAmplitude = 1*0.10 </P>
<P> wavyLambda = 1.0 </P>
<P> K = 0.5*Re-sqrt(0.25*Re*Re+4*PI*PI) </P>
</PARAMETERS>
<VARIABLES>
<V ID="0"> u </V>
<V ID="1"> v </V>
<V ID="2"> w </V>
<V ID="3"> p </V>
</VARIABLES>
<BOUNDARYREGIONS>
<B ID="0"> C[1] </B>
<B ID="1"> C[2] </B>
<B ID="2"> C[3] </B>
</BOUNDARYREGIONS>
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="u" VALUE="(1-exp(K*x)*cos(2*PI*z))" />
<D VAR="v" VALUE="0" />
<D VAR="w" VALUE="(K/(2*PI))*exp(K*x)*sin(2*PI*z)"/>
<N VAR="p" USERDEFINEDTYPE="H" VALUE="0" />
</REGION>
<REGION REF="1">
<D VAR="u" VALUE="(1-exp(K*x)*cos(2*PI*z))" />
<D VAR="v" VALUE="0" />
<D VAR="w" VALUE="(K/(2*PI))*exp(K*x)*sin(2*PI*z)" />
<D VAR="p" VALUE="0.5*(1-exp(2*K*x))" />
</REGION>
<REGION REF="2">
<D VAR="u" VALUE="(1-exp(K*x)*cos(2*PI*z))" />
<D VAR="v" VALUE="0" />
<D VAR="w" VALUE="(K/(2*PI))*exp(K*x)*sin(2*PI*z)" />
<D VAR="p" VALUE="0.5*(1-exp(2*K*x))" />
</REGION>
</BOUNDARYCONDITIONS>
<FUNCTION NAME="InitialConditions">
<E VAR="u" VALUE="(1-exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*cos(2*PI*z))/(1 + cosh(1)/sinh(1)*(1/(cosh(1-x)^2))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)) - (tanh(1-x)/tanh(1))*wavyAmplitude/2*2*PI/wavyLambda*sin(2*PI*z/wavyLambda)/(1 + cosh(1)/sinh(1)*(1/(cosh(1-x)^2))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)) * (K/(2*PI))*exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*sin(2*PI*z)" />
<E VAR="v" VALUE="0" />
<E VAR="w" VALUE="(K/(2*PI))*exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*sin(2*PI*z)" />
<E VAR="p" VALUE="0.5*(1-exp(2*K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda))))" />
</FUNCTION>
<FUNCTION NAME="ExactSolution">
<E VAR="u" VALUE="(1-exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*cos(2*PI*z))/(1 + cosh(1)/sinh(1)*(1/(cosh(1-x)^2))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)) - (tanh(1-x)/tanh(1))*wavyAmplitude/2*2*PI/wavyLambda*sin(2*PI*z/wavyLambda)/(1 + cosh(1)/sinh(1)*(1/(cosh(1-x)^2))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)) * (K/(2*PI))*exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*sin(2*PI*z)" />
<E VAR="v" VALUE="0" />
<E VAR="w" VALUE="(K/(2*PI))*exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*sin(2*PI*z)" />
<E VAR="p" VALUE="0.5*(1-exp(2*K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda))))" />
</FUNCTION>
<FUNCTION NAME="Mapping">
<E VAR="x" VALUE="(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda))" />
</FUNCTION>
</CONDITIONS>
<MAPPING TYPE="XofXZ">
<COORDS>Mapping</COORDS>
</MAPPING>
<GEOMETRY DIM="2" SPACE="2">
<VERTEX>
<V ID="0">-5.000e-01 -5.000e-01 0.000e+00</V>
<V ID="1">-5.000e-01 1.500e+00 0.000e+00</V>
<V ID="2">1.000e+00 1.500e+00 0.000e+00</V>
<V ID="3">1.000e+00 -5.000e-01 0.000e+00</V>
<V ID="4">-5.000e-01 1.000e+00 0.000e+00</V>
<V ID="5">-5.000e-01 5.000e-01 0.000e+00</V>
<V ID="6">-5.000e-01 1.388e-12 0.000e+00</V>
<V ID="7">-1.619e-12 -5.000e-01 0.000e+00</V>
<V ID="8">5.000e-01 -5.000e-01 0.000e+00</V>
<V ID="9">1.000e+00 -1.388e-12 0.000e+00</V>
<V ID="10">1.000e+00 5.000e-01 0.000e+00</V>
<V ID="11">1.000e+00 1.000e+00 0.000e+00</V>
<V ID="12">5.000e-01 1.500e+00 0.000e+00</V>
<V ID="13">1.619e-12 1.500e+00 0.000e+00</V>
<V ID="14">5.000e-01 1.000e+00 0.000e+00</V>
<V ID="15">5.000e-01 5.000e-01 0.000e+00</V>
<V ID="16">5.000e-01 -4.626e-13 0.000e+00</V>
<V ID="17">8.097e-13 1.000e+00 0.000e+00</V>
<V ID="18">5.551e-17 5.000e-01 0.000e+00</V>
<V ID="19">-8.095e-13 4.626e-13 0.000e+00</V>
</VERTEX>
<EDGE>
<E ID="0"> 2 12 </E>
<E ID="1"> 12 14 </E>
<E ID="2"> 14 11 </E>
<E ID="3"> 11 2 </E>
<E ID="4"> 14 15 </E>
<E ID="5"> 15 10 </E>
<E ID="6"> 10 11 </E>
<E ID="7"> 15 16 </E>
<E ID="8"> 16 9 </E>
<E ID="9"> 9 10 </E>
<E ID="10"> 16 8 </E>
<E ID="11"> 8 3 </E>
<E ID="12"> 3 9 </E>
<E ID="13"> 12 13 </E>
<E ID="14"> 13 17 </E>
<E ID="15"> 17 14 </E>
<E ID="16"> 17 18 </E>
<E ID="17"> 18 15 </E>
<E ID="18"> 18 19 </E>
<E ID="19"> 19 16 </E>
<E ID="20"> 19 7 </E>
<E ID="21"> 7 8 </E>
<E ID="22"> 13 1 </E>
<E ID="23"> 1 4 </E>
<E ID="24"> 4 17 </E>
<E ID="25"> 4 5 </E>
<E ID="26"> 5 18 </E>
<E ID="27"> 5 6 </E>
<E ID="28"> 6 19 </E>
<E ID="29"> 6 0 </E>
<E ID="30"> 0 7 </E>
</EDGE>
<ELEMENT>
<Q ID="0"> 0 1 2 3 </Q>
<Q ID="1"> 2 4 5 6 </Q>
<Q ID="2"> 5 7 8 9 </Q>
<Q ID="3"> 8 10 11 12 </Q>
<Q ID="4"> 13 14 15 1 </Q>
<Q ID="5"> 15 16 17 4 </Q>
<Q ID="6"> 17 18 19 7 </Q>
<Q ID="7"> 19 20 21 10 </Q>
<Q ID="8"> 22 23 24 14 </Q>
<Q ID="9"> 24 25 26 16 </Q>
<Q ID="10"> 26 27 28 18 </Q>
<Q ID="11"> 28 29 30 20 </Q>
</ELEMENT>
<COMPOSITE>
<C ID="0"> Q[0-11] </C> <!-- Domain -->
<C ID="1"> E[23,25,27,29] </C> <!-- Inflow -->
<C ID="2"> E[3,6,9,12] </C> <!-- Outflow -->
<C ID="3"> E[0,11,13,21,22,30] </C> <!-- Walls -->
</COMPOSITE>
<DOMAIN> C[0] </DOMAIN>
</GEOMETRY>
</NEKTAR>
<?xml version="1.0" encoding="utf-8"?>
<test>
<description>Kovasznay Flow 3D homogeneous 1D, P=8, 16 Fourier modes, using implicit mapping</description>
<executable>IncNavierStokesSolver</executable>
<parameters>KovaFlow_3DH1D_P8_16modes_Mapping-implicit.xml</parameters>
<files>
<file description="Session File">KovaFlow_3DH1D_P8_16modes_Mapping-implicit.xml</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-9">1.46561e-05</value>
<value variable="v" tolerance="1e-9">1.26223e-08</value>
<value variable="w" tolerance="1e-9">1.08012e-07</value>
<value variable="p" tolerance="1e-9">1.08632e-06</value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-9">1.64559e-05</value>
<value variable="v" tolerance="1e-9">2.00666e-07</value>
<value variable="w" tolerance="1e-9">3.53111e-07</value>
<value variable="p" tolerance="1e-9">7.99001e-06</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<NEKTAR xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.nektar.info/schema/nektar.xsd">
<EXPANSIONS>
<E COMPOSITE="C[0]" NUMMODES="8" FIELDS="u,v,w,p" TYPE="MODIFIED" />
</EXPANSIONS>
<CONDITIONS>
<SOLVERINFO>
<I PROPERTY="SolverType" VALUE="VCSMapping" />
<I PROPERTY="EQTYPE" VALUE="UnsteadyNavierStokes" />
<I PROPERTY="AdvectionForm" VALUE="Convective" />
<I PROPERTY="Projection" VALUE="Galerkin" />
<I PROPERTY="TimeIntegrationMethod" VALUE="IMEXOrder1" />
<I PROPERTY="HOMOGENEOUS" VALUE="1D" />
<I PROPERTY="GlobalSysSoln" VALUE="DirectMultiLevelStaticCond"/>
<I PROPERTY="USEFFT" VALUE="FFTW"/>
<I PROPERTY="MappingImplicitPressure" VALUE="TRUE"/> <!-- Default = FALSE -->
<I PROPERTY="MappingImplicitViscous" VALUE="TRUE"/> <!-- Default = FALSE -->
</SOLVERINFO>
<PARAMETERS>
<P> TimeStep = 0.001 </P>
<P> NumSteps = 10</P>
<P> IO_CheckSteps = NumSteps </P>
<P> IO_CFLSteps = 100 </P>
<P> IO_InfoSteps = 100 </P>
<P> Re = 40.0 </P>
<P> Kinvis = 1/Re </P>
<P> HomModesZ = 16 </P>
<P> LZ = 2.0 </P>
<P> wavyAmplitude = 1*0.10 </P>
<P> wavyLambda = 1.0 </P>
<P> K = 0.5*Re-sqrt(0.25*Re*Re+4*PI*PI) </P>
<P> MappingPressureTolerance = 1e-8 </P> <!-- Default = 1e-12 -->
<P> MappingViscousTolerance = 1e-8 </P> <!-- Default = 1e-12 -->
<P> MappingPressureRelaxation = 0.9 </P> <!-- Default = 1.0 -->
<P> MappingViscousRelaxation = 0.9 </P> <!-- Default = 1.0 -->
</PARAMETERS>
<VARIABLES>
<V ID="0"> u </V>
<V ID="1"> v </V>
<V ID="2"> w </V>
<V ID="3"> p </V>
</VARIABLES>
<BOUNDARYREGIONS>
<B ID="0"> C[1] </B>
<B ID="1"> C[2] </B>
<B ID="2"> C[3] </B>
</BOUNDARYREGIONS>
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="u" VALUE="(1-exp(K*x)*cos(2*PI*z))" />
<D VAR="v" VALUE="0" />
<D VAR="w" VALUE="(K/(2*PI))*exp(K*x)*sin(2*PI*z)"/>
<N VAR="p" USERDEFINEDTYPE="H" VALUE="0" />
</REGION>
<REGION REF="1">
<D VAR="u" VALUE="(1-exp(K*x)*cos(2*PI*z))" />
<D VAR="v" VALUE="0" />
<D VAR="w" VALUE="(K/(2*PI))*exp(K*x)*sin(2*PI*z)" />
<D VAR="p" VALUE="0.5*(1-exp(2*K*x))" />
</REGION>
<REGION REF="2">
<D VAR="u" VALUE="(1-exp(K*x)*cos(2*PI*z))" />
<D VAR="v" VALUE="0" />
<D VAR="w" VALUE="(K/(2*PI))*exp(K*x)*sin(2*PI*z)" />
<D VAR="p" VALUE="0.5*(1-exp(2*K*x))" />
</REGION>
</BOUNDARYCONDITIONS>
<FUNCTION NAME="InitialConditions">
<E VAR="u" VALUE="(1-exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*cos(2*PI*z))/(1 + cosh(1)/sinh(1)*(1/(cosh(1-x)^2))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)) - (tanh(1-x)/tanh(1))*wavyAmplitude/2*2*PI/wavyLambda*sin(2*PI*z/wavyLambda)/(1 + cosh(1)/sinh(1)*(1/(cosh(1-x)^2))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)) * (K/(2*PI))*exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*sin(2*PI*z)" />
<E VAR="v" VALUE="0" />
<E VAR="w" VALUE="(K/(2*PI))*exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*sin(2*PI*z)" />
<E VAR="p" VALUE="0.5*(1-exp(2*K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda))))" />
</FUNCTION>
<FUNCTION NAME="ExactSolution">
<E VAR="u" VALUE="(1-exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*cos(2*PI*z))/(1 + cosh(1)/sinh(1)*(1/(cosh(1-x)^2))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)) - (tanh(1-x)/tanh(1))*wavyAmplitude/2*2*PI/wavyLambda*sin(2*PI*z/wavyLambda)/(1 + cosh(1)/sinh(1)*(1/(cosh(1-x)^2))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)) * (K/(2*PI))*exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*sin(2*PI*z)" />
<E VAR="v" VALUE="0" />
<E VAR="w" VALUE="(K/(2*PI))*exp(K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda)))*sin(2*PI*z)" />
<E VAR="p" VALUE="0.5*(1-exp(2*K*(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda))))" />
</FUNCTION>
<FUNCTION NAME="Mapping">
<E VAR="x" VALUE="(x - (tanh(1-x)/tanh(1))*wavyAmplitude/2*cos(2*PI*z/wavyLambda))" />
</FUNCTION>
</CONDITIONS>
<MAPPING TYPE="XofXZ">
<COORDS>Mapping</COORDS>
</MAPPING>
<GEOMETRY DIM="2" SPACE="2">
<VERTEX>
<V ID="0">-5.000e-01 -5.000e-01 0.000e+00</V>
<V ID="1">-5.000e-01 1.500e+00 0.000e+00</V>
<V ID="2">1.000e+00 1.500e+00 0.000e+00</V>
<V ID="3">1.000e+00 -5.000e-01 0.000e+00</V>
<V ID="4">-5.000e-01 1.000e+00 0.000e+00</V>
<V ID="5">-5.000e-01 5.000e-01 0.000e+00</V>
<V ID="6">-5.000e-01 1.388e-12 0.000e+00</V>
<V ID="7">-1.619e-12 -5.000e-01 0.000e+00</V>
<V ID="8">5.000e-01 -5.000e-01 0.000e+00</V>
<V ID="9">1.000e+00 -1.388e-12 0.000e+00</V>
<V ID="10">1.000e+00 5.000e-01 0.000e+00</V>
<V ID="11">1.000e+00 1.000e+00 0.000e+00</V>
<V ID="12">5.000e-01 1.500e+00 0.000e+00</V>
<V ID="13">1.619e-12 1.500e+00 0.000e+00</V>
<V ID="14">5.000e-01 1.000e+00 0.000e+00</V>
<V ID="15">5.000e-01 5.000e-01 0.000e+00</V>
<V ID="16">5.000e-01 -4.626e-13 0.000e+00</V>
<V ID="17">8.097e-13 1.000e+00 0.000e+00</V>
<V ID="18">5.551e-17 5.000e-01 0.000e+00</V>
<V ID="19">-8.095e-13 4.626e-13 0.000e+00</V>
</VERTEX>
<EDGE>
<E ID="0"> 2 12 </E>
<E ID="1"> 12 14 </E>
<E ID="2"> 14 11 </E>
<E ID="3"> 11 2 </E>
<E ID="4"> 14 15 </E>
<E ID="5"> 15 10 </E>
<E ID="6"> 10 11 </E>
<E ID="7"> 15 16 </E>
<E ID="8"> 16 9 </E>
<E ID="9"> 9 10 </E>
<E ID="10"> 16 8 </E>
<E ID="11"> 8 3 </E>
<E ID="12"> 3 9 </E>
<E ID="13"> 12 13 </E>
<E ID="14"> 13 17 </E>
<E ID="15"> 17 14 </E>
<E ID="16"> 17 18 </E>
<E ID="17"> 18 15 </E>
<E ID="18"> 18 19 </E>
<E ID="19"> 19 16 </E>
<E ID="20"> 19 7 </E>
<E ID="21"> 7 8 </E>
<E ID="22"> 13 1 </E>
<E ID="23"> 1 4 </E>
<E ID="24"> 4 17 </E>
<E ID="25"> 4 5 </E>
<E ID="26"> 5 18 </E>
<E ID="27"> 5 6 </E>
<E ID="28"> 6 19 </E>
<E ID="29"> 6 0 </E>
<E ID="30"> 0 7 </E>
</EDGE>
<ELEMENT>
<Q ID="0"> 0 1 2 3 </Q>
<Q ID="1"> 2 4 5 6 </Q>
<Q ID="2"> 5 7 8 9 </Q>
<Q ID="3"> 8 10 11 12 </Q>
<Q ID="4"> 13 14 15 1 </Q>
<Q ID="5"> 15 16 17 4 </Q>
<Q ID="6"> 17 18 19 7 </Q>
<Q ID="7"> 19 20 21 10 </Q>
<Q ID="8"> 22 23 24 14 </Q>
<Q ID="9"> 24 25 26 16 </Q>
<Q ID="10"> 26 27 28 18 </Q>
<Q ID="11"> 28 29 30 20 </Q>
</ELEMENT>
<COMPOSITE>
<C ID="0"> Q[0-11] </C> <!-- Domain -->
<C ID="1"> E[23,25,27,29] </C> <!-- Inflow -->
<C ID="2"> E[3,6,9,12] </C> <!-- Outflow -->
<C ID="3"> E[0,11,13,21,22,30] </C> <!-- Walls -->
</COMPOSITE>
<DOMAIN> C[0] </DOMAIN>
</GEOMETRY>
</NEKTAR>
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