|
[Sponsors] | |||||
|
|
|
#1 |
|
Senior Member
|
Hi all,
i am working on a new thermodynamic model based on the flamelet solver of alberto cuoci. I copied the thermodynamic src code into a new folder, called SLFMThermo and renamed everything in the code to SLFM... Okay ... after that I compiled the basicThermo and the SLFMThermo and everything worked fine. After that I removed everything and build the alberto thermodynamicm model again and it worked ![]() Now I added my model to the Make/files file and compiled again. As I get to the SLFMThermo I ll get the following output: Code:
SLFMThermo/SLFMThermo.C:32: error: redefinition of ‘Foam::SLFMThermo<MixtureType>::SLFMThermo(const Foam::fvMesh&)’ SLFMThermo/SLFMThermo.C:32: error: ‘Foam::SLFMThermo<MixtureType>::SLFMThermo(const Foam::fvMesh&)’ previously declared here SLFMThermo/SLFMThermo.C:298: error: redefinition of ‘Foam::SLFMThermo<MixtureType>::~SLFMThermo()’ SLFMThermo/SLFMThermo.C:298: error: ‘virtual Foam::SLFMThermo<MixtureType>::~SLFMThermo()’ previously declared here SLFMThermo/SLFMThermo.C:305: error: redefinition of ‘void Foam::SLFMThermo<MixtureType>::calculate()’ Can someone give me an advice? Tobi |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
|
Hi all,
today I had a look at the thermodynamic model hRho and hsRho and its the same like I have. Well I simplyfied my c++ code so that there is just the constructor and deconstructor in the header and source files. I get the same error: Code:
SLFMThermo/SLFMThermo.C:32: error: redefinition of ‘Foam::SLFMThermo<MixtureType>::SLFMThermo(const Foam::fvMesh&)’ SLFMThermo/SLFMThermo.C:32: error: ‘Foam::SLFMThermo<MixtureType>::SLFMThermo(const Foam::fvMesh&)’ previously declared here SLFMThermo/SLFMThermo.C:59: error: redefinition of ‘Foam::SLFMThermo<MixtureType>::~SLFMThermo()’ SLFMThermo/SLFMThermo.C:59: error: ‘virtual Foam::SLFMThermo<MixtureType>::~SLFMThermo()’ previously declared here My source file is: Code:
\*---------------------------------------------------------------------------*/
#include "SLFMThermo.H"
#include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::SLFMThermo<MixtureType>::SLFMThermo(const fvMesh& mesh)
:
basicFThermo(mesh),
MixtureType(*this, mesh),
h_laminar_
(
IOobject
(
"h",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet(0, 2, -2, 0, 0),
hBoundaryTypes()
)
{
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::SLFMThermo<MixtureType>::~SLFMThermo()
{}
and my header file is: Code:
*---------------------------------------------------------------------------*/
#ifndef SLFMThermo_H
#define SLFMThermo_H
#include "basicFThermo.H"
#include "basicMixture.H"
#include "OpenSMOKE_SLFM_NonAdiabaticFlamelet_Library.hpp"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class SLFMThermo Declaration
\*---------------------------------------------------------------------------*/
template<class MixtureType>
class SLFMThermo
:
public basicFThermo,
public MixtureType
{
private:
volScalarField h_laminar_;
OpenSMOKE_SLFM_NonAdiabaticFlamelet_Library flamelets_library;
private:
SLFMThermo(const SLFMThermo<MixtureType>&);
public:
//- Runtime type information
TypeName("SLFMThermo");
// Constructors
//- Construct from mesh
SLFMThermo(const fvMesh&);
//- Destructor
virtual ~SLFMThermo();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#ifdef NoRepository
# include "SLFMThermo.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
:/ Couse if I just compile my thermo model it works. with both - i get redifinitions
|
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
|
Hi all,
I fixed the problem. I deleted all folders and did the same things again. Now I can compile everything without any errors and the solvers are working If the laminarFlameletSolver works good and the validation gives good results I ll share it with you! Tobi |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reynolds Stress model in CFX vs Fluent | Tim | CFX | 1 | October 7, 2009 06:19 |
| help for different between les model (subgrid-scale model) | liuyuxuan | FLUENT | 1 | October 2, 2009 15:25 |
| mass flow in is not equal to mass flow out | saii | CFX | 2 | September 18, 2009 08:07 |
| 2 stage axial turbine model convergence issues | sherifkadry | CFX | 2 | September 7, 2009 20:51 |
| Advanced Turbulence Modeling in Fluent, Realizable k-epsilon Model | Jonas Larsson | FLUENT | 6 | June 21, 2009 10:02 |