mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
release on 2013-04-29_17-07-55
This commit is contained in:
81
README
81
README
@ -1,81 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
CFDEMcoupling - Open Source CFD-DEM coupling
|
|
||||||
|
|
||||||
CFDEMcoupling is part of the CFDEMproject
|
|
||||||
www.cfdem.com
|
|
||||||
Christoph Goniva, christoph.goniva@cfdem.com
|
|
||||||
Copyright 2009-2012 JKU Linz
|
|
||||||
Copyright 2012- DCS Computing GmbH, Linz
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of CFDEMcoupling.
|
|
||||||
|
|
||||||
CFDEMcoupling is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 3 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
CFDEMcoupling 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 General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with CFDEMcoupling; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Description
|
|
||||||
This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
|
|
||||||
and OpenFOAM. Note: this code is not part of OpenFOAM (see DISCLAIMER).
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
|
|
||||||
CFDEM coupling provides an open source parallel coupled CFD-DEM framework
|
|
||||||
combining the strengths of LIGGGHTS DEM code and the Open Source
|
|
||||||
CFD package OpenFOAM(R)(*). The CFDEMcoupling toolbox allows to expand
|
|
||||||
standard CFD solvers of OpenFOAM(R)(*) to include a coupling to the DEM
|
|
||||||
code LIGGGHTS. In this toolbox the particle representation within the
|
|
||||||
CFD solver is organized by "cloud" classes. Key functionalities are organised
|
|
||||||
in sub-models (e.g. force models, data exchange models, etc.) which can easily
|
|
||||||
be selected and combined by dictionary settings.
|
|
||||||
|
|
||||||
The coupled solvers run fully parallel on distributed-memory clusters.
|
|
||||||
|
|
||||||
Features are:
|
|
||||||
|
|
||||||
- its modular approach allows users to easily implement new models
|
|
||||||
- its MPI parallelization enables to use it for large scale problems
|
|
||||||
- the "forum"_lws on CFD-DEM gives the possibility to exchange with other
|
|
||||||
users / developers
|
|
||||||
- the use of GIT allows to easily update to the latest version
|
|
||||||
- basic documentation is provided
|
|
||||||
|
|
||||||
The file structure:
|
|
||||||
|
|
||||||
- "src" directory including the source files of the coupling toolbox and models
|
|
||||||
- "applications" directory including the solver files for coupled CFD-DEM simulations
|
|
||||||
- "doc" directory including the documentation of CFDEMcoupling
|
|
||||||
- "tutorials" directory including basic tutorial cases showing the functionality
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Details on installation are given on the "www.cfdem.com"
|
|
||||||
|
|
||||||
The functionality of this CFD-DEM framwork is described via "tutorial cases" showing
|
|
||||||
how to use different solvers and models.
|
|
||||||
|
|
||||||
CFDEMcoupling stands for Computational Fluid Dynamics (CFD) -
|
|
||||||
Discrete Element Method (DEM) coupling.
|
|
||||||
|
|
||||||
CFDEMcoupling is an open-source code, distributed freely under the terms of the
|
|
||||||
GNU Public License (GPL).
|
|
||||||
|
|
||||||
Core development of CFDEMcoupling is done by
|
|
||||||
Christoph Goniva and Christoph Kloss, both at DCS Computing GmbH, 2012
|
|
||||||
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
(*) "OpenFOAM(R)"_of is a registered trade mark of the ESI Group.
|
|
||||||
This offering is not affiliated, approved or endorsed by ESI Group,
|
|
||||||
the producer of the OpenFOAM® software and owner of the OpenFOAM® trade mark.
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
Binary file not shown.
Binary file not shown.
@ -1,5 +1,6 @@
|
|||||||
fvPatchFields = fields/fvPatchFields
|
fvPatchFields = fields/fvPatchFields
|
||||||
derivedFvPatchFields = $(fvPatchFields)/derived
|
derivedFvPatchFields = $(fvPatchFields)/derived
|
||||||
$(derivedFvPatchFields)/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchFields.C
|
$(derivedFvPatchFields)/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchFields.C
|
||||||
|
$(derivedFvPatchFields)/uniformFixedValueTube/uniformFixedValueTubeFvPatchFields.C
|
||||||
|
|
||||||
LIB = $(CFDEM_LIB_DIR)/libfiniteVolumeCFDEM
|
LIB = $(CFDEM_LIB_DIR)/libfiniteVolumeCFDEM
|
||||||
|
|||||||
@ -0,0 +1,190 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM 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 General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "uniformFixedValueTubeFvPatchField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
uniformFixedValueTubeFvPatchField<Type>::uniformFixedValueTubeFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
fixedValueFvPatchField<Type>(p, iF),
|
||||||
|
uniformValue_(),
|
||||||
|
velocityFieldName_("U"),
|
||||||
|
densityFieldName_("rho"),
|
||||||
|
tubeLength_(-1.),
|
||||||
|
tubeDiameter_(-1.),
|
||||||
|
wallRoughness_(-1)
|
||||||
|
{
|
||||||
|
Info << "error, wrong constructor!" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
uniformFixedValueTubeFvPatchField<Type>::uniformFixedValueTubeFvPatchField
|
||||||
|
(
|
||||||
|
const uniformFixedValueTubeFvPatchField<Type>& ptf,
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
|
const fvPatchFieldMapper&
|
||||||
|
)
|
||||||
|
:
|
||||||
|
fixedValueFvPatchField<Type>(p, iF),
|
||||||
|
uniformValue_(ptf.uniformValue_().clone().ptr()),
|
||||||
|
velocityFieldName_("U"),
|
||||||
|
densityFieldName_("rho"),
|
||||||
|
tubeLength_(ptf.tubeLength_),
|
||||||
|
tubeDiameter_(ptf.tubeDiameter_),
|
||||||
|
wallRoughness_(ptf.wallRoughness_)
|
||||||
|
{
|
||||||
|
const scalar t = this->db().time().timeOutputValue();
|
||||||
|
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||||
|
Info << "error, wrong constructor!" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
uniformFixedValueTubeFvPatchField<Type>::uniformFixedValueTubeFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
fixedValueFvPatchField<Type>(p, iF),
|
||||||
|
uniformValue_(DataEntry<Type>::New("uniformValue", dict)),
|
||||||
|
velocityFieldName_("U"),
|
||||||
|
densityFieldName_("rho"),
|
||||||
|
tubeLength_(readScalar(dict.lookup("tubeLength"))),
|
||||||
|
tubeDiameter_(readScalar(dict.lookup("tubeDiameter"))),
|
||||||
|
wallRoughness_(readScalar(dict.lookup("wallRoughness")))
|
||||||
|
{
|
||||||
|
const scalar t = this->db().time().timeOutputValue();
|
||||||
|
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
uniformFixedValueTubeFvPatchField<Type>::uniformFixedValueTubeFvPatchField
|
||||||
|
(
|
||||||
|
const uniformFixedValueTubeFvPatchField<Type>& ptf
|
||||||
|
)
|
||||||
|
:
|
||||||
|
fixedValueFvPatchField<Type>(ptf),
|
||||||
|
uniformValue_(ptf.uniformValue_().clone().ptr()),
|
||||||
|
velocityFieldName_("U"),
|
||||||
|
densityFieldName_("rho"),
|
||||||
|
tubeLength_(ptf.tubeLength_),
|
||||||
|
tubeDiameter_(ptf.tubeDiameter_),
|
||||||
|
wallRoughness_(ptf.wallRoughness_)
|
||||||
|
{
|
||||||
|
const scalar t = this->db().time().timeOutputValue();
|
||||||
|
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
uniformFixedValueTubeFvPatchField<Type>::uniformFixedValueTubeFvPatchField
|
||||||
|
(
|
||||||
|
const uniformFixedValueTubeFvPatchField<Type>& ptf,
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
fixedValueFvPatchField<Type>(ptf, iF),
|
||||||
|
uniformValue_(ptf.uniformValue_().clone().ptr()),
|
||||||
|
velocityFieldName_("U"),
|
||||||
|
densityFieldName_("rho"),
|
||||||
|
tubeLength_(ptf.tubeLength_),
|
||||||
|
tubeDiameter_(ptf.tubeDiameter_),
|
||||||
|
wallRoughness_(ptf.wallRoughness_)
|
||||||
|
{
|
||||||
|
const scalar t = this->db().time().timeOutputValue();
|
||||||
|
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void uniformFixedValueTubeFvPatchField<Type>::autoMap
|
||||||
|
(
|
||||||
|
const fvPatchFieldMapper& m
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this->setSize(m.size());
|
||||||
|
const scalar t = this->db().time().timeOutputValue();
|
||||||
|
fvPatchField<Type>::operator==(uniformValue_->value(t));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void uniformFixedValueTubeFvPatchField<Type>::updateCoeffs()
|
||||||
|
{
|
||||||
|
if (this->updated())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const fvPatchField<vector>& velocity = this->patch().template lookupPatchField<volVectorField, vector>(velocityFieldName_);
|
||||||
|
const fvPatchField<scalar>& density = this->patch().template lookupPatchField<volScalarField, scalar>(densityFieldName_);
|
||||||
|
const scalar t = this->db().time().timeOutputValue();
|
||||||
|
|
||||||
|
// calc zeta value
|
||||||
|
scalar zeta=1;
|
||||||
|
|
||||||
|
// some relaxation might be useful?
|
||||||
|
|
||||||
|
// calc pressure drop
|
||||||
|
fvPatchField<Type>::operator==(0.5*zeta*density*mag(velocity)*mag(velocity)*uniformValue_->value(t));
|
||||||
|
|
||||||
|
fixedValueFvPatchField<Type>::updateCoeffs();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void uniformFixedValueTubeFvPatchField<Type>::write(Ostream& os) const
|
||||||
|
{
|
||||||
|
fvPatchField<Type>::write(os);
|
||||||
|
uniformValue_->writeData(os);
|
||||||
|
os.writeKeyword("tubeLength") << tubeLength_ << token::END_STATEMENT << nl;
|
||||||
|
os.writeKeyword("tubeDiameter") << tubeDiameter_ << token::END_STATEMENT << nl;
|
||||||
|
os.writeKeyword("wallRoughness") << wallRoughness_ << token::END_STATEMENT << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,177 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
CFDEMcoupling - Open Source CFD-DEM coupling
|
||||||
|
|
||||||
|
CFDEMcoupling is part of the CFDEMproject
|
||||||
|
www.cfdem.com
|
||||||
|
Christoph Goniva, christoph.goniva@cfdem.com
|
||||||
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2012- DCS Computing GmbH,Linz
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of CFDEMcoupling.
|
||||||
|
|
||||||
|
CFDEMcoupling is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
CFDEMcoupling 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 General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with CFDEMcoupling. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::uniformFixedValueTubeFvPatchField
|
||||||
|
|
||||||
|
Description
|
||||||
|
Foam::uniformFixedValueTubeFvPatchField is an evolution of
|
||||||
|
Foam::uniformFixedValueFvPatchField
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
uniformFixedValueTubeFvPatchField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef uniformFixedValueTubeFvPatchField_H
|
||||||
|
#define uniformFixedValueTubeFvPatchField_H
|
||||||
|
|
||||||
|
#include "Random.H"
|
||||||
|
#include "fixedValueFvPatchFields.H"
|
||||||
|
#include "DataEntry.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class uniformFixedValueTubeFvPatch Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class uniformFixedValueTubeFvPatchField
|
||||||
|
:
|
||||||
|
public fixedValueFvPatchField<Type>
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
autoPtr<DataEntry<Type> > uniformValue_;
|
||||||
|
|
||||||
|
word velocityFieldName_;
|
||||||
|
|
||||||
|
word densityFieldName_;
|
||||||
|
|
||||||
|
scalar tubeLength_;
|
||||||
|
|
||||||
|
scalar tubeDiameter_;
|
||||||
|
|
||||||
|
scalar wallRoughness_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("uniformFixedValueTube");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from patch and internal field
|
||||||
|
uniformFixedValueTubeFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from patch, internal field and dictionary
|
||||||
|
uniformFixedValueTubeFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&,
|
||||||
|
const dictionary&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct by mapping given uniformFixedValueTubeFvPatchField
|
||||||
|
// onto a new patch
|
||||||
|
uniformFixedValueTubeFvPatchField
|
||||||
|
(
|
||||||
|
const uniformFixedValueTubeFvPatchField<Type>&,
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&,
|
||||||
|
const fvPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct as copy
|
||||||
|
uniformFixedValueTubeFvPatchField
|
||||||
|
(
|
||||||
|
const uniformFixedValueTubeFvPatchField<Type>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
virtual tmp<fvPatchField<Type> > clone() const
|
||||||
|
{
|
||||||
|
return tmp<fvPatchField<Type> >
|
||||||
|
(
|
||||||
|
new uniformFixedValueTubeFvPatchField<Type>(*this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Construct as copy setting internal field reference
|
||||||
|
uniformFixedValueTubeFvPatchField
|
||||||
|
(
|
||||||
|
const uniformFixedValueTubeFvPatchField<Type>&,
|
||||||
|
const DimensionedField<Type, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone setting internal field reference
|
||||||
|
virtual tmp<fvPatchField<Type> > clone
|
||||||
|
(
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return tmp<fvPatchField<Type> >
|
||||||
|
(
|
||||||
|
new uniformFixedValueTubeFvPatchField<Type>(*this, iF)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
// Mapping functions
|
||||||
|
|
||||||
|
//- Map (and resize as needed) from self given a mapping object
|
||||||
|
virtual void autoMap
|
||||||
|
(
|
||||||
|
const fvPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Evaluation functions
|
||||||
|
|
||||||
|
//- Update the coefficients associated with the patch field
|
||||||
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
|
|
||||||
|
//- Write
|
||||||
|
virtual void write(Ostream&) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "uniformFixedValueTubeFvPatchField.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
CFDEMcoupling - Open Source CFD-DEM coupling
|
||||||
|
|
||||||
|
CFDEMcoupling is part of the CFDEMproject
|
||||||
|
www.cfdem.com
|
||||||
|
Christoph Goniva, christoph.goniva@cfdem.com
|
||||||
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2012- DCS Computing GmbH,Linz
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of CFDEMcoupling.
|
||||||
|
|
||||||
|
CFDEMcoupling is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
CFDEMcoupling 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 General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with CFDEMcoupling. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "uniformFixedValueTubeFvPatchFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePatchFields(uniformFixedValueTube);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
CFDEMcoupling - Open Source CFD-DEM coupling
|
||||||
|
|
||||||
|
CFDEMcoupling is part of the CFDEMproject
|
||||||
|
www.cfdem.com
|
||||||
|
Christoph Goniva, christoph.goniva@cfdem.com
|
||||||
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2012- DCS Computing GmbH,Linz
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of CFDEMcoupling.
|
||||||
|
|
||||||
|
CFDEMcoupling is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
CFDEMcoupling 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 General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with CFDEMcoupling. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
This BC can be used to have a "virtual" tube attached to an outlet.
|
||||||
|
Pressure is calculated as a function of velocity, density
|
||||||
|
and the tube properties.
|
||||||
|
|
||||||
|
usage:
|
||||||
|
|
||||||
|
type uniformFixedValueTube;
|
||||||
|
uniformValue 1; // keep 1!
|
||||||
|
tubeLength 1; // length of tubing
|
||||||
|
tubeDiameter 1; // diameter of tubing
|
||||||
|
wallRoughness 1; // wall roughness
|
||||||
|
|
||||||
|
activate by adding: libs ("libfiniteVolumeCFDEM.so");
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef uniformFixedValueTubeFvPatchFields_H
|
||||||
|
#define uniformFixedValueTubeFvPatchFields_H
|
||||||
|
|
||||||
|
#include "uniformFixedValueTubeFvPatchField.H"
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePatchTypeFieldTypedefs(uniformFixedValueTube);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
CFDEMcoupling - Open Source CFD-DEM coupling
|
||||||
|
|
||||||
|
CFDEMcoupling is part of the CFDEMproject
|
||||||
|
www.cfdem.com
|
||||||
|
Christoph Goniva, christoph.goniva@cfdem.com
|
||||||
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2012- DCS Computing GmbH,Linz
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of CFDEMcoupling.
|
||||||
|
|
||||||
|
CFDEMcoupling is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
CFDEMcoupling 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 General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with CFDEMcoupling. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef uniformFixedValueFvPatchFieldsFwd_H
|
||||||
|
#define uniformFixedValueFvPatchFieldsFwd_H
|
||||||
|
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type> class uniformFixedValueFvPatchField;
|
||||||
|
|
||||||
|
makePatchTypeFieldTypedefs(uniform);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -6,7 +6,6 @@ voidFractionModels = subModels/voidFractionModel
|
|||||||
locateModels = subModels/locateModel
|
locateModels = subModels/locateModel
|
||||||
meshMotionModels = subModels/meshMotionModel
|
meshMotionModels = subModels/meshMotionModel
|
||||||
momCoupleModels = subModels/momCoupleModel
|
momCoupleModels = subModels/momCoupleModel
|
||||||
regionModels = subModels/regionModel
|
|
||||||
dataExchangeModels = subModels/dataExchangeModel
|
dataExchangeModels = subModels/dataExchangeModel
|
||||||
averagingModels = subModels/averagingModel
|
averagingModels = subModels/averagingModel
|
||||||
clockModels = subModels/clockModel
|
clockModels = subModels/clockModel
|
||||||
@ -21,18 +20,33 @@ $(forceModels)/forceModel/newForceModel.C
|
|||||||
$(forceModels)/noDrag/noDrag.C
|
$(forceModels)/noDrag/noDrag.C
|
||||||
$(forceModels)/checkCouplingInterval/checkCouplingInterval.C
|
$(forceModels)/checkCouplingInterval/checkCouplingInterval.C
|
||||||
$(forceModels)/DiFeliceDrag/DiFeliceDrag.C
|
$(forceModels)/DiFeliceDrag/DiFeliceDrag.C
|
||||||
|
$(forceModels)/DiFeliceDragNLift/DiFeliceDragNLift.C
|
||||||
$(forceModels)/GidaspowDrag/GidaspowDrag.C
|
$(forceModels)/GidaspowDrag/GidaspowDrag.C
|
||||||
$(forceModels)/SchillerNaumannDrag/SchillerNaumannDrag.C
|
$(forceModels)/SchillerNaumannDrag/SchillerNaumannDrag.C
|
||||||
$(forceModels)/Archimedes/Archimedes.C
|
$(forceModels)/Archimedes/Archimedes.C
|
||||||
$(forceModels)/ArchimedesIB/ArchimedesIB.C
|
$(forceModels)/ArchimedesIB/ArchimedesIB.C
|
||||||
$(forceModels)/interface/interface.C
|
$(forceModels)/interface/interface.C
|
||||||
$(forceModels)/ShirgaonkarIB/ShirgaonkarIB.C
|
$(forceModels)/ShirgaonkarIB/ShirgaonkarIB.C
|
||||||
|
$(forceModels)/fieldTimeAverage/fieldTimeAverage.C
|
||||||
|
$(forceModels)/fieldBound/fieldBound.C
|
||||||
|
$(forceModels)/volWeightedAverage/volWeightedAverage.C
|
||||||
|
$(forceModels)/totalMomentumExchange/totalMomentumExchange.C
|
||||||
$(forceModels)/KochHillDrag/KochHillDrag.C
|
$(forceModels)/KochHillDrag/KochHillDrag.C
|
||||||
|
$(forceModels)/BeetstraDrag/multiphaseFlowBasic/multiphaseFlowBasic.C
|
||||||
|
$(forceModels)/BeetstraDrag/BeetstraDrag.C
|
||||||
|
$(forceModels)/LaEuScalarLiquid/LaEuScalarLiquid.C
|
||||||
$(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C
|
$(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C
|
||||||
|
$(forceModels)/LaEuScalarDust/LaEuScalarDust.C
|
||||||
$(forceModels)/virtualMassForce/virtualMassForce.C
|
$(forceModels)/virtualMassForce/virtualMassForce.C
|
||||||
$(forceModels)/gradPForce/gradPForce.C
|
$(forceModels)/gradPForce/gradPForce.C
|
||||||
|
$(forceModels)/gradULiftForce/gradULiftForce.C
|
||||||
$(forceModels)/viscForce/viscForce.C
|
$(forceModels)/viscForce/viscForce.C
|
||||||
$(forceModels)/MeiLift/MeiLift.C
|
$(forceModels)/MeiLift/MeiLift.C
|
||||||
|
$(forceModels)/KochHillDragNLift/KochHillDragNLift.C
|
||||||
|
$(forceModels)/solidsPressureForce/solidsPressureForce.C
|
||||||
|
$(forceModels)/periodicPressure/periodicPressure.C
|
||||||
|
$(forceModels)/periodicPressureControl/periodicPressureControl.C
|
||||||
|
$(forceModels)/averageSlipVel/averageSlipVel.C
|
||||||
|
|
||||||
$(forceModelsMS)/forceModelMS/forceModelMS.C
|
$(forceModelsMS)/forceModelMS/forceModelMS.C
|
||||||
$(forceModelsMS)/forceModelMS/newForceModelMS.C
|
$(forceModelsMS)/forceModelMS/newForceModelMS.C
|
||||||
@ -62,21 +76,18 @@ $(locateModels)/turboEngineSearch/turboEngineSearch.C
|
|||||||
$(locateModels)/turboEngineSearchM2M/turboEngineSearchM2M.C
|
$(locateModels)/turboEngineSearchM2M/turboEngineSearchM2M.C
|
||||||
$(locateModels)/engineSearchIB/engineSearchIB.C
|
$(locateModels)/engineSearchIB/engineSearchIB.C
|
||||||
|
|
||||||
|
|
||||||
$(meshMotionModels)/meshMotionModel/meshMotionModel.C
|
$(meshMotionModels)/meshMotionModel/meshMotionModel.C
|
||||||
$(meshMotionModels)/meshMotionModel/newMeshMotionModel.C
|
$(meshMotionModels)/meshMotionModel/newMeshMotionModel.C
|
||||||
$(meshMotionModels)/noMeshMotion/noMeshMotion.C
|
$(meshMotionModels)/noMeshMotion/noMeshMotion.C
|
||||||
|
$(meshMotionModels)/DEMdrivenMeshMotion/DEMdrivenMeshMotion.C
|
||||||
|
|
||||||
$(momCoupleModels)/momCoupleModel/momCoupleModel.C
|
$(momCoupleModels)/momCoupleModel/momCoupleModel.C
|
||||||
$(momCoupleModels)/momCoupleModel/newMomCoupleModel.C
|
$(momCoupleModels)/momCoupleModel/newMomCoupleModel.C
|
||||||
$(momCoupleModels)/explicitCouple/explicitCouple.C
|
$(momCoupleModels)/explicitCouple/explicitCouple.C
|
||||||
|
$(momCoupleModels)/explicitCoupleSource/explicitCoupleSource.C
|
||||||
$(momCoupleModels)/implicitCouple/implicitCouple.C
|
$(momCoupleModels)/implicitCouple/implicitCouple.C
|
||||||
$(momCoupleModels)/noCouple/noCouple.C
|
$(momCoupleModels)/noCouple/noCouple.C
|
||||||
|
|
||||||
$(regionModels)/regionModel/regionModel.C
|
|
||||||
$(regionModels)/regionModel/newRegionModel.C
|
|
||||||
$(regionModels)/allRegion/allRegion.C
|
|
||||||
|
|
||||||
$(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C
|
$(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C
|
||||||
$(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C
|
$(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C
|
||||||
$(dataExchangeModels)/oneWayVTK/oneWayVTK.C
|
$(dataExchangeModels)/oneWayVTK/oneWayVTK.C
|
||||||
@ -102,4 +113,4 @@ $(liggghtsCommandModels)/runLiggghts/runLiggghts.C
|
|||||||
$(liggghtsCommandModels)/writeLiggghts/writeLiggghts.C
|
$(liggghtsCommandModels)/writeLiggghts/writeLiggghts.C
|
||||||
$(liggghtsCommandModels)/readLiggghtsData/readLiggghtsData.C
|
$(liggghtsCommandModels)/readLiggghtsData/readLiggghtsData.C
|
||||||
|
|
||||||
LIB = $(FOAM_USER_LIBBIN)/lib$(CFDEM_LIB_NAME)
|
LIB = $(CFDEM_LIB_DIR)/lib$(CFDEM_LIB_NAME)
|
||||||
|
|||||||
@ -265,6 +265,8 @@ public:
|
|||||||
|
|
||||||
inline bool numberOfParticlesChanged() const;
|
inline bool numberOfParticlesChanged() const;
|
||||||
|
|
||||||
|
inline int numberOfClumps() const;
|
||||||
|
|
||||||
inline bool arraysReallocated() const;
|
inline bool arraysReallocated() const;
|
||||||
|
|
||||||
inline const wordList& forceModels();
|
inline const wordList& forceModels();
|
||||||
|
|||||||
@ -141,6 +141,12 @@ inline bool cfdemCloud::numberOfParticlesChanged() const
|
|||||||
return numberOfParticlesChanged_;
|
return numberOfParticlesChanged_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline int cfdemCloud::numberOfClumps() const
|
||||||
|
{
|
||||||
|
Warning << "cfdemCloud::numberOfClumps() is not called correctly!" << endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
inline bool cfdemCloud::arraysReallocated() const
|
inline bool cfdemCloud::arraysReallocated() const
|
||||||
{
|
{
|
||||||
return arraysReallocated_;
|
return arraysReallocated_;
|
||||||
|
|||||||
@ -222,9 +222,6 @@ void Foam::cfdemCloudMS::setForces()
|
|||||||
resetArray(impForces_,numberOfParticles(),3);
|
resetArray(impForces_,numberOfParticles(),3);
|
||||||
resetArray(expForces_,numberOfParticles(),3);
|
resetArray(expForces_,numberOfParticles(),3);
|
||||||
resetArray(DEMForces_,numberOfParticles(),3);
|
resetArray(DEMForces_,numberOfParticles(),3);
|
||||||
Info << "hallo1" << endl;
|
|
||||||
cfdemCloudMS::nrForceModels();
|
|
||||||
Info << "hallo2" << endl;
|
|
||||||
for (int i=0;i<cfdemCloudMS::nrForceModels();i++) cfdemCloudMS::forceM(i).setForce();
|
for (int i=0;i<cfdemCloudMS::nrForceModels();i++) cfdemCloudMS::forceM(i).setForce();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,7 +249,7 @@ label Foam::cfdemCloudMS::cellIDCM(int index)
|
|||||||
|
|
||||||
label Foam::cfdemCloudMS::body(int index)
|
label Foam::cfdemCloudMS::body(int index)
|
||||||
{
|
{
|
||||||
return bodies_[0][index];
|
return bodies_[0][index]-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
label Foam::cfdemCloudMS::nrigid(int index)
|
label Foam::cfdemCloudMS::nrigid(int index)
|
||||||
|
|||||||
@ -88,7 +88,7 @@ void Foam::dataExchangeModel::allocateArray
|
|||||||
{
|
{
|
||||||
int len=0;
|
int len=0;
|
||||||
if(strcmp(length,"nparticles")==0) len = particleCloud_.numberOfParticles();
|
if(strcmp(length,"nparticles")==0) len = particleCloud_.numberOfParticles();
|
||||||
else if (strcmp(length,"nbodies")==0) len = nClumpTypes_;
|
else if (strcmp(length,"nbodies")==0) len = particleCloud_.numberOfClumps();
|
||||||
else FatalError<<"call allocateArray with length, nparticles or nbodies!\n" << abort(FatalError);
|
else FatalError<<"call allocateArray with length, nparticles or nbodies!\n" << abort(FatalError);
|
||||||
allocateArray(array,initVal,width,len);
|
allocateArray(array,initVal,width,len);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -318,6 +318,8 @@ int Foam::twoWayMPI::getNumberOfParticles() const
|
|||||||
|
|
||||||
int Foam::twoWayMPI::getNumberOfClumps() const
|
int Foam::twoWayMPI::getNumberOfClumps() const
|
||||||
{
|
{
|
||||||
|
Info << "liggghts_get_maxtag_ms(lmp)=" << liggghts_get_maxtag_ms(lmp) << endl;
|
||||||
|
|
||||||
return liggghts_get_maxtag_ms(lmp);
|
return liggghts_get_maxtag_ms(lmp);
|
||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -207,13 +207,21 @@ void DiFeliceDragMS::setForce() const
|
|||||||
ind=cloudRefMS().body(index);
|
ind=cloudRefMS().body(index);
|
||||||
nrigidC=cloudRefMS().nrigid(ind);
|
nrigidC=cloudRefMS().nrigid(ind);
|
||||||
|
|
||||||
|
cloudRefMS().impForcesCM();
|
||||||
|
Warning <<"A BUG occurred in DiFeliceDragMS::setForce!!! nrigidC = " << nrigidC <<", ind = " << ind <<", index=" << index <<"\n" << endl;
|
||||||
|
|
||||||
if (nrigidC <= 0)
|
if (nrigidC <= 0)
|
||||||
{
|
{
|
||||||
Warning <<"A BUG occurred in DiFeliceDragMS::setForce!!! nrigidC = " << nrigidC <<", ind = " << ind <<", index=" << index <<"\n" << endl;
|
Warning <<"A BUG occurred in DiFeliceDragMS::setForce!!! nrigidC = " << nrigidC <<", ind = " << ind <<", index=" << index <<"\n" << endl;
|
||||||
nrigidC = 1000;
|
nrigidC = 1000;
|
||||||
}
|
}
|
||||||
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += cloudRefMS().expForcesCM()[ind][j] / nrigidC;
|
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += cloudRefMS().expForcesCM()[ind][j] / nrigidC;
|
||||||
else for(int j=0;j<3;j++) impForces()[index][j] += cloudRefMS().impForcesCM()[ind][j] / nrigidC;
|
else{
|
||||||
|
for(int j=0;j<3;j++){
|
||||||
|
Info << "j=" << j << "ind=" << ind << endl;
|
||||||
|
impForces()[index][j] += cloudRefMS().impForcesCM()[ind][j] / nrigidC;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,8 +35,9 @@ boundaryField
|
|||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
//type zeroGradient;
|
//type zeroGradient;
|
||||||
|
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value uniform 100000;
|
value uniform 1.0e5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ adjustTimeStep no;
|
|||||||
|
|
||||||
maxCo 0.1;
|
maxCo 0.1;
|
||||||
|
|
||||||
//libs ( "libgroovyBC.so" );
|
//libs ( "libgroovyBC.so" "libfiniteVolumeCFDEM.so");
|
||||||
|
|
||||||
functions
|
functions
|
||||||
(
|
(
|
||||||
|
|||||||
@ -24,3 +24,14 @@ dummyfile
|
|||||||
dummyfile
|
dummyfile
|
||||||
dummyfile
|
dummyfile
|
||||||
dummyfile
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
dummyfile
|
||||||
|
|||||||
Reference in New Issue
Block a user