|
[Sponsors] |
Changing viewfactor Model and use the changed my model by calling "mySolver" |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 13, 2014, 08:20 |
Changing viewfactor Model and use the changed my model by calling "mySolver"
|
#1 |
New Member
Fabian
Join Date: Jan 2014
Posts: 4
Rep Power: 12 |
Hello,
here is what I am trying to do:
Code:
/* Radiation model */ radiationModel/radiationModel/radiationModel.C radiationModel/radiationModel/radiationModelNew.C radiationModel/noRadiation/noRadiation.C radiationModel/P1/P1.C radiationModel/fvDOM/fvDOM/fvDOM.C radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C radiationModel/fvDOM/blackBodyEmission/blackBodyEmission.C radiationModel/fvDOM/absorptionCoeffs/absorptionCoeffs.C radiationModel/viewFactor/viewFactor.C radiationModel/opaqueSolid/opaqueSolid.C /* Scatter model */ submodels/scatterModel/scatterModel/scatterModel.C submodels/scatterModel/scatterModel/scatterModelNew.C submodels/scatterModel/noScatter/noScatter.C submodels/scatterModel/constantScatter/constantScatter.C /* Absorption/Emission model */ submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModel.C submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C submodels/absorptionEmissionModel/noAbsorptionEmission/noAbsorptionEmission.C submodels/absorptionEmissionModel/constantAbsorptionEmission/constantAbsorptionEmission.C submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.C submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C /* Boundary conditions */ derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C derivedFvPatchFields/radiationCoupledBase/radiationCoupledBase.C derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C LIB = $(FOAM_USER_LIBBIN)/libmyRadiationModels Code:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude LIB_LIBS = \ -lfiniteVolume \ -lfluidThermophysicalModels \ -lspecie \ -lsolidThermo \ -lmeshTools \ -lSLGThermo \ -lsolidMixtureProperties \ -lliquidMixtureProperties \ -lsolidProperties \ -lliquidProperties
Code:
buoyantSimpleFoam.C EXE = $(FOAM_USER_APPBIN)/myBuoyantSimpleFoam Code:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(WM_PROJECT_USER_DIR)/src/myRadiationModels/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/RAS \ EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -lfiniteVolume \ -lfvOptions \ -lsampling \ -lmeshTools \ -lfluidThermophysicalModels \ -lspecie \ -lmyRadiationModels \ -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lmeshTools
Code:
Duplicate entry MarshakRadiation in runtime selection table fvPatchField #0 /opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x28) [0x7f05ee9fc8c8] #1 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xc7139) [0x7f05ef54a139] #2 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xe38a6) [0x7f05ef5668a6] Duplicate entry MarshakRadiation in runtime selection table fvPatchField #0 /opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x28) [0x7f05ee9fc8c8] #1 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xc7091) [0x7f05ef54a091] #2 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xe38a6) [0x7f05ef5668a6] Duplicate entry MarshakRadiation in runtime selection table fvPatchField #0 /opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x28) [0x7f05ee9fc8c8] #1 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xc71d4) [0x7f05ef54a1d4] #2 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xe38a6) [0x7f05ef5668a6] Duplicate entry greyMeanSolidAbsorptionEmission in runtime selection table absorptionEmissionModel #0 /opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x28) [0x7f05ee9fc8c8] #1 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xc25dc) [0x7f05ef5455dc] #2 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xe38a6) [0x7f05ef5668a6] Duplicate entry wideBandAbsorptionEmission in runtime selection table absorptionEmissionModel #0 /opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x28) [0x7f05ee9fc8c8] #1 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xbe4ec) [0x7f05ef5414ec] #2 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xe38a6) [0x7f05ef5668a6] Duplicate entry greyMeanAbsorptionEmission in runtime selection table absorptionEmissionModel #0 /opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x28) [0x7f05ee9fc8c8] #1 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xb447c) [0x7f05ef53747c] #2 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xe38a6) [0x7f05ef5668a6] Duplicate entry binaryAbsorptionEmission in runtime selection table absorptionEmissionModel #0 /opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x28) [0x7f05ee9fc8c8] #1 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xb03ac) [0x7f05ef5333ac] #2 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xe38a6) [0x7f05ef5668a6] Duplicate entry constantAbsorptionEmission in runtime selection table absorptionEmissionModel #0 /opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x28) [0x7f05ee9fc8c8] #1 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xae40e) [0x7f05ef53140e] #2 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xe38a6) [0x7f05ef5668a6] Duplicate entry none in runtime selection table absorptionEmissionModel #0 /opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x28) [0x7f05ee9fc8c8] #1 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xab7c8) [0x7f05ef52e7c8] #2 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xe38a6) [0x7f05ef5668a6] Duplicate entry constantScatter in runtime selection table scatterModel #0 /opt/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x28) [0x7f05ee9fc8c8] #1 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xa705e) [0x7f05ef52a05e] #2 /home/ff/OpenFOAM/ff-2.2.1/platforms/linux64GccDPOpt/lib/libmyRadiationModels.so(+0xe38a6) [0x7f05ef5668a6] => I would like to understand what these warnings are telling me and how to get rid of them. Who can help? A suggestion of a totally different approach would be fine as well. Please consider in your answer, that my OF and C++ knowledge is just on a beginners level. So I am thankful for any explanation that goes a little beyond the actual problem and extends my general knowledge about OF and compiling with wmake. I read the openFoam userguide and googled about wmake and make in c++, but so far I just have some sort of idea what the problem could be, but can not find a solution. Thanks in advance for your efforts, Regards Fabian |
|
January 13, 2014, 14:48 |
|
#2 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Hello there.
What appears to be happening is that the original library (or parts of it) are being linked in the solver as well as your new library. There are two entries in the runTime selection table that have the same name (in the case of the error you posted, its the absorptionEmission model). Try changing the options file for your new solver either by: 1. Remove Code:
-L$(FOAM_USER_LIBBIN) \ 2. Specify the full path for your custom library, ie Code:
-/$(FOAM_USER_LIBBIN)/libmyRadiationModels.so \ |
|
January 14, 2014, 12:25 |
|
#3 |
New Member
Fabian
Join Date: Jan 2014
Posts: 4
Rep Power: 12 |
Hi Marco,
Thank you for dealing with my problem. I tried your solution suggestions, but they would not do the trick. But I guess you are hinting in the right direction. One of the included lnIncludes of the solver already seems to include the unchanged radiation model. That is why the type definitions ("TypeName") appear twice if my model is added as well. I have solved the problem now with a different approach, analogue to this one: http://www.tfd.chalmers.se/~hani/kur...lenceModel.pdf This approach is already mentioned in the Forum, from the guys who deal with turbulence modelling. So I only compiled a "myViewfactor" folder into a "myLibrary", after I had changed TypeName viewFactor and every appearance of viewFactor into myViewfactor in the files. Now I can include the "myLibrary" in the controlDict, and by using "myViewFactor" in the viewFactorControlDict I can switch to my model. So I can't switch by choosing a different solver, but by editing two lines in a dictionary, which is a sufficient solution for me. Thanks again to you |
|
|
|