|
[Sponsors] |
Modify SemiImplicitSource for time varying source |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 20, 2020, 11:21 |
Modify SemiImplicitSource for time varying source
|
#1 |
New Member
Sagar
Join Date: Apr 2016
Posts: 23
Rep Power: 10 |
Hello all!
I am trying to model a time varying mass source with reactingParcelFoam solver. I basically want to see what happens when the compactness of the source changes to the evolution of the species. For this I have removed the source which is computed from the evaporation of the parcels in the OpenFoam. I am trying to use fvOptions to multiply the source with sinusoid to make it vary in the time domain. To add sin function, I am trying to add the sin(Time) to Su in the source file. I copied the SemiImplicitSource source files to my local working directory and then changed the file names to sineSource.C and sineSource.H and made changes accordingly everywhere including the Make folder. However, when I try to compile I get the following error Code:
sources/general/sineSource/sineSource.C:38:18: error: redefinition of ‘const wordList Foam::fv::sineSource<Type>::volumeModeTypeNames_’ IStringStream("(absolute specific)")() ^ In file included from sources/general/sineSource/sineSource.H:221:0, from sources/general/sineSource/sineSource.C:27: sources/general/sineSource/sineSource.C:36:22: note: ‘const wordList Foam::fv::sineSource<Type>::volumeModeTypeNames_’ previously declared here const Foam::wordList Foam::fv::sineSource<Type>::volumeModeTypeNames_ ^~~~ sources/general/sineSource/sineSource.C:46:1: error: redefinition of ‘Foam::fv::sineSource<Type>::volumeModeType Foam::fv::sineSource<Type>::wordToVolumeModeType(const Foam::word&) const’ Foam::fv::sineSource<Type>::wordToVolumeModeType ^~~~ In file included from sources/general/sineSource/sineSource.H:221:0, from sources/general/sineSource/sineSource.C:27: sources/general/sineSource/sineSource.C:46:1: note: ‘Foam::fv::sineSource<Type>::volumeModeType Foam::fv::sineSource<Type>::wordToVolumeModeType(const Foam::word&) const’ previously declared here Foam::fv::sineSource<Type>::wordToVolumeModeType ^~~~ sources/general/sineSource/sineSource.C:69:12: error: redefinition of ‘Foam::word Foam::fv::sineSource<Type>::volumeModeTypeToWord(const Foam::fv::sineSource<Type>::volumeModeType&) const’ Foam::word Foam::fv::sineSource<Type>::volumeModeTypeToWord ^~~~ In file included from sources/general/sineSource/sineSource.H:221:0, from sources/general/sineSource/sineSource.C:27: sources/general/sineSource/sineSource.C:69:12: note: ‘Foam::word Foam::fv::sineSource<Type>::volumeModeTypeToWord(const Foam::fv::sineSource<Type>::volumeModeType&) const’ previously declared here Foam::word Foam::fv::sineSource<Type>::volumeModeTypeToWord ^~~~ sources/general/sineSource/sineSource.C:86:6: error: redefinition of ‘void Foam::fv::sineSource<Type>::setFieldData(const Foam::dictionary&)’ void Foam::fv::sineSource<Type>::setFieldData(const dictionary& dict) ^~~~ In file included from sources/general/sineSource/sineSource.H:221:0, from sources/general/sineSource/sineSource.C:27: sources/general/sineSource/sineSource.C:86:6: note: ‘void Foam::fv::sineSource<Type>::setFieldData(const Foam::dictionary&)’ previously declared here void Foam::fv::sineSource<Type>::setFieldData(const dictionary& dict) ^~~~ sources/general/sineSource/sineSource.C:112:1: error: redefinition of ‘Foam::fv::sineSource<Type>::sineSource(const Foam::word&, const Foam::word&, const Foam::dictionary&, const Foam::fvMesh&)’ Foam::fv::sineSource<Type>::sineSource ^~~~ In file included from sources/general/sineSource/sineSource.H:221:0, from sources/general/sineSource/sineSource.C:27: sources/general/sineSource/sineSource.C:112:1: note: ‘Foam::fv::sineSource<Type>::sineSource(const Foam::word&, const Foam::word&, const Foam::dictionary&, const Foam::fvMesh&)’ previously declared here Foam::fv::sineSource<Type>::sineSource ^~~~ sources/general/sineSource/sineSource.C:132:6: error: redefinition of ‘void Foam::fv::sineSource<Type>::addSup(Foam::fvMatrix<Type>&, Foam::label)’ void Foam::fv::sineSource<Type>::addSup ^~~~ In file included from sources/general/sineSource/sineSource.H:221:0, from sources/general/sineSource/sineSource.C:27: sources/general/sineSource/sineSource.C:132:6: note: ‘virtual void Foam::fv::sineSource<Type>::addSup(Foam::fvMatrix<Type>&, Foam::label)’ previously declared here void Foam::fv::sineSource<Type>::addSup ^~~~ sources/general/sineSource/sineSource.C:195:6: error: redefinition of ‘void Foam::fv::sineSource<Type>::addSup(const volScalarField&, Foam::fvMatrix<Type>&, Foam::label)’ void Foam::fv::sineSource<Type>::addSup ^~~~ In file included from sources/general/sineSource/sineSource.H:221:0, from sources/general/sineSource/sineSource.C:27: sources/general/sineSource/sineSource.C:195:6: note: ‘virtual void Foam::fv::sineSource<Type>::addSup(const volScalarField&, Foam::fvMatrix<Type>&, Foam::label)’ previously declared here void Foam::fv::sineSource<Type>::addSup ^~~~ /home/sagar/OpenFOAM/OpenFOAM-4.x/wmake/rules/General/transform:8: recipe for target 'Make/linux64GccDPInt32Opt/sources/general/sineSource/sineSource.o' failed make: *** [Make/linux64GccDPInt32Opt/sources/general/sineSource/sineSource.o] Error 1 Thank you |
|
Tags |
fvoptions mass source |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] swak4foam compiling issues on a cluster | saj216 | OpenFOAM Installation | 5 | January 17, 2023 17:05 |
[Other] Tabulated thermophysicalProperties library | chriss85 | OpenFOAM Community Contributions | 62 | October 2, 2022 04:50 |
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 | Seroga | OpenFOAM Community Contributions | 9 | June 12, 2015 18:18 |
Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |