Commit 5176fd17 authored by Chris Cantwell's avatar Chris Cantwell

Removed old ten tusscher models, tidied new code.

parent 9a471326
......@@ -15,9 +15,6 @@ IF( NEKTAR_SOLVER_CARDIAC_EP )
./CellModels/LuoRudy91.cpp
./CellModels/Fox02.cpp
./CellModels/Winslow99.cpp
./CellModels/TenTusscher06Epi.cpp
./CellModels/TenTusscher06M.cpp
./CellModels/TenTusscher06Endo.cpp
./CellModels/TenTusscher06.cpp
./Filters/FilterCheckpointCellModel.cpp
./Filters/FilterElectrogram.cpp
......
......@@ -73,30 +73,50 @@ namespace Nektar
TenTusscher06::Variants>("CellModelVariant");
switch (model_variant) {
case eEpicardium:
g_to = 0.294;
g_Ks = 0.392;
s_inf_factor = 20.0;
k_0 = 5.4;
break;
case eEndocardium:
g_to = 0.073;
g_Ks = 0.392;
s_inf_factor = 28.0;
k_0 = 5.4;
break;
case eMid:
g_to = 0.294;
g_Ks = 0.098;
s_inf_factor = 20.0;
k_0 = 5.4;
break;
case eIschemia:
g_to = 0.294;
g_Ks = 0.392;
s_inf_factor = 20.0;
k_0 = 9.0;
break;
case eEpicardium:
g_to = 0.294;
g_Ks = 0.392;
s_inf_factor = 20.0;
s_tau_f1 = 85.0;
s_tau_f2 = 45.0;
s_tau_f3 = 320.0;
s_tau_f4 = 0.0;
s_tau_f5 = 1.0;
k_0 = 5.4;
break;
case eEndocardium:
g_to = 0.073;
g_Ks = 0.392;
s_inf_factor = 28.0;
s_tau_f1 = 1000.0;
s_tau_f2 = 67.0;
s_tau_f3 = 1000.0;
s_tau_f4 = 8.0;
s_tau_f5 = 0.0;
k_0 = 5.4;
break;
case eMid:
g_to = 0.294;
g_Ks = 0.098;
s_inf_factor = 20.0;
s_tau_f1 = 85.0;
s_tau_f2 = 45.0;
s_tau_f3 = 320.0;
s_tau_f4 = 0.0;
s_tau_f5 = 1.0;
k_0 = 5.4;
break;
case eIschemia:
g_to = 0.294;
g_Ks = 0.392;
s_inf_factor = 20.0;
s_tau_f1 = 85.0;
s_tau_f2 = 45.0;
s_tau_f3 = 320.0;
s_tau_f4 = 0.0;
s_tau_f5 = 1.0;
k_0 = 9.0;
break;
}
m_nvar = 19;
......@@ -361,18 +381,7 @@ namespace Nektar
// const NekDouble var_L_type_Ca_current__L_type_Ca_current_fCass_gate__d_fCass_d_environment__time = var_L_type_Ca_current_fCass_gate__d_fCass_d_environment__time; // per_millisecond
const NekDouble var_transient_outward_current_s_gate__V = var_transient_outward_current__V; // millivolt
const NekDouble var_transient_outward_current_s_gate__s_inf = 1.0 / (1.0 + exp((var_transient_outward_current_s_gate__V + s_inf_factor) / 5.0)); // dimensionless
NekDouble var_transient_outward_current_s_gate__tau_s ;
switch (model_variant)
{
case eEpicardium:
case eMid:
case eIschemia:
var_transient_outward_current_s_gate__tau_s = (85.0 * exp((-pow(var_transient_outward_current_s_gate__V + 45.0, 2.0)) / 320.0)) + (5.0 / (1.0 + exp((var_transient_outward_current_s_gate__V - 20.0) / 5.0))) + 3.0; // millisecond
break;
case eEndocardium:
var_transient_outward_current_s_gate__tau_s = (1000.0 * exp((-pow(var_transient_outward_current_s_gate__V + 67.0, 2.0)) / 1000.0)) + 8.0; // millisecond
break;
}
const NekDouble var_transient_outward_current_s_gate__tau_s = (s_tau_f1 * exp((-pow(var_transient_outward_current_s_gate__V + s_tau_f2, 2.0)) / s_tau_f3)) + s_tau_f4 + s_tau_f5*((5.0 / (1.0 + exp((var_transient_outward_current_s_gate__V - 20.0) / 5.0))) + 3.0); // millisecond
// const NekDouble var_transient_outward_current_s_gate__s = var_transient_outward_current__s; // dimensionless
// const NekDouble var_transient_outward_current_s_gate__d_s_d_environment__time = (var_transient_outward_current_s_gate__s_inf - var_transient_outward_current_s_gate__s) / var_transient_outward_current_s_gate__tau_s; // per_millisecond
// const NekDouble var_transient_outward_current__transient_outward_current_s_gate__d_s_d_environment__time = var_transient_outward_current_s_gate__d_s_d_environment__time; // per_millisecond
......
......@@ -75,7 +75,11 @@ namespace Nektar
NekDouble g_to;
NekDouble g_Ks;
NekDouble s_inf_factor;
NekDouble s_tau_factor;
NekDouble s_tau_f1;
NekDouble s_tau_f2;
NekDouble s_tau_f3;
NekDouble s_tau_f4;
NekDouble s_tau_f5;
NekDouble k_0;
enum Variants {
......
///////////////////////////////////////////////////////////////////////////////
//
// File TenTusscher06Endo.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: ten Tusscher 2006 Endocardium cell model
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_TENTUSSCHER_PANFILOV_2006_ENDO_CELL_H
#define NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_TENTUSSCHER_PANFILOV_2006_ENDO_CELL_H
#include <CardiacEPSolver/CellModels/CellModel.h>
namespace Nektar
{
class TenTusscher06Endo : public CellModel
{
public:
/// Creates an instance of this class
static CellModelSharedPtr create(
const LibUtilities::SessionReaderSharedPtr& pSession,
const MultiRegions::ExpListSharedPtr& pField)
{
return MemoryManager<TenTusscher06Endo>::AllocateSharedPtr(pSession, pField);
}
/// Name of class
static std::string className;
/// Constructor
TenTusscher06Endo(
const LibUtilities::SessionReaderSharedPtr& pSession,
const MultiRegions::ExpListSharedPtr& pField);
/// Desctructor
virtual ~TenTusscher06Endo() {}
protected:
/// Computes the reaction terms $f(u,v)$ and $g(u,v)$.
virtual void v_Update(
const Array<OneD, const Array<OneD, NekDouble> >&inarray,
Array<OneD, Array<OneD, NekDouble> >&outarray,
const NekDouble time);
/// Prints a summary of the model parameters.
virtual void v_GenerateSummary(SummaryList& s);
virtual void v_SetInitialConditions();
};
}
#endif
///////////////////////////////////////////////////////////////////////////////
//
// File TenTusscher06Epi.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: ten Tusscher 2006 Epicardium cell model
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_TENTUSSCHER_PANFILOV_2006_EPI_CELL_H
#define NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_TENTUSSCHER_PANFILOV_2006_EPI_CELL_H
#include <CardiacEPSolver/CellModels/CellModel.h>
namespace Nektar
{
class TenTusscher06Epi : public CellModel
{
public:
/// Creates an instance of this class
static CellModelSharedPtr create(
const LibUtilities::SessionReaderSharedPtr& pSession,
const MultiRegions::ExpListSharedPtr& pField)
{
return MemoryManager<TenTusscher06Epi>::AllocateSharedPtr(pSession, pField);
}
/// Name of class
static std::string className;
/// Constructor
TenTusscher06Epi(const LibUtilities::SessionReaderSharedPtr& pSession, const MultiRegions::ExpListSharedPtr& pField);
/// Desctructor
virtual ~TenTusscher06Epi() {}
protected:
virtual void v_Update(
const Array<OneD, const Array<OneD, NekDouble> >&inarray,
Array<OneD, Array<OneD, NekDouble> >&outarray,
const NekDouble time);
/// Prints a summary of the model parameters.
virtual void v_GenerateSummary(SummaryList& s);
virtual void v_SetInitialConditions();
};
}
#endif
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////////
//
// File TenTusscher06M.h
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial College London (UK), and Scientific
// Computing and Imaging Institute, University of Utah (USA).
//
// License for the specific language governing rights and limitations under
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: ten Tusscher 2006 Mid-myocardium cell model
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_TENTUSSCHER_PANFILOV_2006_M_CELL_H
#define NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_TENTUSSCHER_PANFILOV_2006_M_CELL_H
#include <CardiacEPSolver/CellModels/CellModel.h>
namespace Nektar
{
class TenTusscher06M : public CellModel
{
public:
/// Creates an instance of this class
static CellModelSharedPtr create(
const LibUtilities::SessionReaderSharedPtr& pSession,
const MultiRegions::ExpListSharedPtr& pField)
{
return MemoryManager<TenTusscher06M>::AllocateSharedPtr(pSession, pField);
}
/// Name of class
static std::string className;
/// Constructor
TenTusscher06M(
const LibUtilities::SessionReaderSharedPtr& pSession,
const MultiRegions::ExpListSharedPtr& pField);
/// Destructor
virtual ~TenTusscher06M() {}
protected:
/// Computes the reaction terms $f(u,v)$ and $g(u,v)$.
virtual void v_Update(
const Array<OneD, const Array<OneD, NekDouble> >&inarray,
Array<OneD, Array<OneD, NekDouble> >&outarray,
const NekDouble time);
/// Prints a summary of the model parameters.
virtual void v_GenerateSummary(SummaryList& s);
virtual void v_SetInitialConditions();
private:
};
}
#endif
......@@ -14,9 +14,6 @@ SET(PP_SOURCES ./Prepacing.cpp
../../CellModels/CellModel.cpp
../../CellModels/CourtemancheRamirezNattel98.cpp
../../CellModels/FentonKarma.cpp
../../CellModels/TenTusscher06Endo.cpp
../../CellModels/TenTusscher06Epi.cpp
../../CellModels/TenTusscher06M.cpp
../../CellModels/TenTusscher06.cpp
../../Stimuli/Stimulus.cpp
../../Stimuli/StimulusPoint.cpp
......
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