aslFDMultiPhase.h
Go to the documentation of this file.
/*
* Advanced Simulation Library <http://asl.org.il>
*
* Copyright 2015 Avtech Scientific <http://avtechscientific.com>
*
*
* This file is part of Advanced Simulation Library (ASL).
*
* ASL is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, version 3 of the License.
*
* ASL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with ASL. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ASLFDMULTIPHASE_H
#define ASLFDMULTIPHASE_H
#include "aslSingleKernelNM.h"
#include "acl/aclMath/aclVectorOfElementsDef.h"
namespace acl
{
class VectorOfElementsData;
class VectorOfElements;
}
namespace asl
{
class VectorTemplate;
template <typename V> class DataWithGhostNodes;
typedef DataWithGhostNodes<acl::VectorOfElementsData> DataWithGhostNodesACLData;
typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
class AbstractDataWithGhostNodes;
typedef std::shared_ptr<AbstractDataWithGhostNodes> SPAbstractDataWithGhostNodes;
class FDMultiPhase: public SingleKernelNM
{
public:
typedef SPDataWithGhostNodesACLData Data;
typedef SPAbstractDataWithGhostNodes Field;
private:
std::vector<Data> cData;
std::vector<Data> cInternalData;
Field velocity;
bool compressibilityCorrectionFlag;
const VectorTemplate* vectorTemplate;
int t;
acl::VectorOfElements diffusionCoefficient;
acl::VectorOfElements repulsionConstant;
virtual void init0();
virtual void postProcessing();
public:
FDMultiPhase();
FDMultiPhase(Data c,
const acl::VectorOfElements & dC,
const acl::VectorOfElements & rC,
const VectorTemplate* vT);
void setDiffusionCoefficient(acl::VectorOfElements d);
inline const acl::VectorOfElements & getDiffusionCoefficient() const;
void setRepulsionConstant(acl::VectorOfElements d);
inline const acl::VectorOfElements & getRepulsionConstant() const;
void setVectorTemplate(VectorTemplate* vT);
inline const VectorTemplate* getVectorTemplate() const;
void setVelocity(Field v, bool compressibilityCorrection=false);
inline Field getVelocity();
inline std::vector<Data> & getData();
void addComponent(Data c);
};
typedef std::shared_ptr<FDMultiPhase> SPFDMultiPhase;
SPFDMultiPhase generateFDMultiPhase(SPDataWithGhostNodesACLData c,
SPAbstractDataWithGhostNodes v,
const VectorTemplate* vt,
bool compressibilityCorrection = false);
SPFDMultiPhase generateFDAdvectionDiffusion(SPDataWithGhostNodesACLData c,
double diffustionCoeff,
const VectorTemplate* vt);
// ------------------------- Implementation ------------------------
inline FDMultiPhase::Field FDMultiPhase::getVelocity()
{
return velocity;
}
inline std::vector<FDMultiPhase::Data> & FDMultiPhase::getData()
{
return cData;
}
inline const VectorTemplate* FDMultiPhase::getVectorTemplate() const
{
return vectorTemplate;
}
inline const acl::VectorOfElements &
FDMultiPhase::getDiffusionCoefficient() const
{
return diffusionCoefficient;
}
} // asl
#endif // ASLFDMULTIPHASE_H
acl::VectorOfElements
The class represents several Element.
Definition: aclVectorOfElementsDef.h:92
asl::FDMultiPhase
Numerical method which computes multiphase transport processes.
Definition: aslFDMultiPhase.h:59
asl::FDMultiPhase::getDiffusionCoefficient
const acl::VectorOfElements & getDiffusionCoefficient() const
Definition: aslFDMultiPhase.h:147
asl::FDMultiPhase::getVectorTemplate
const VectorTemplate * getVectorTemplate() const
Definition: aslFDMultiPhase.h:141
asl::FDMultiPhase::setVectorTemplate
void setVectorTemplate(VectorTemplate *vT)
asl::FDMultiPhase::FDMultiPhase
FDMultiPhase(Data c, const acl::VectorOfElements &dC, const acl::VectorOfElements &rC, const VectorTemplate *vT)
asl::FDMultiPhase::addComponent
void addComponent(Data c)
asl::FDMultiPhase::FDMultiPhase
FDMultiPhase()
asl::FDMultiPhase::Field
SPAbstractDataWithGhostNodes Field
Definition: aslFDMultiPhase.h:62
asl::FDMultiPhase::setDiffusionCoefficient
void setDiffusionCoefficient(acl::VectorOfElements d)
asl::FDMultiPhase::setVelocity
void setVelocity(Field v, bool compressibilityCorrection=false)
asl::FDMultiPhase::getRepulsionConstant
const acl::VectorOfElements & getRepulsionConstant() const
asl::FDMultiPhase::getVelocity
Field getVelocity()
Definition: aslFDMultiPhase.h:131
asl::FDMultiPhase::Data
SPDataWithGhostNodesACLData Data
Definition: aslFDMultiPhase.h:61
asl::FDMultiPhase::setRepulsionConstant
void setRepulsionConstant(acl::VectorOfElements d)
asl::FDMultiPhase::getData
std::vector< Data > & getData()
Definition: aslFDMultiPhase.h:136
asl::SingleKernelNM
Definition: aslSingleKernelNM.h:47
asl::VectorTemplate
Defines set of vectros with several properties.
Definition: aslTemplates.h:88
asl::generateFDAdvectionDiffusion
SPFDAdvectionDiffusion generateFDAdvectionDiffusion(SPDataWithGhostNodesACLData c, double diffustionCoeff, SPAbstractDataWithGhostNodes v, const VectorTemplate *vt, bool compressibilityCorrection=false)
asl::generateFDMultiPhase
SPFDMultiPhase generateFDMultiPhase(SPDataWithGhostNodesACLData c, SPAbstractDataWithGhostNodes v, const VectorTemplate *vt, bool compressibilityCorrection=false)
acl
Advanced Computational Language.
Definition: acl.h:41
asl
Advanced Simulation Library.
Definition: aslDataInc.h:31
asl::DataWithGhostNodesACLData
DataWithGhostNodes< acl::VectorOfElementsData > DataWithGhostNodesACLData
Definition: aslGenerators.h:45
asl::SPFDMultiPhase
std::shared_ptr< FDMultiPhase > SPFDMultiPhase
Definition: aslFDMultiPhase.h:97
asl::SPAbstractDataWithGhostNodes
std::shared_ptr< AbstractDataWithGhostNodes > SPAbstractDataWithGhostNodes
Definition: aslGenerators.h:50
asl::SPDataWithGhostNodesACLData
std::shared_ptr< DataWithGhostNodesACLData > SPDataWithGhostNodesACLData
Definition: aslGenerators.h:47
aslSingleKernelNM.h