make a dimensionedScalar to be volScalarField
Hi,
I wanna make the diameter of the particle to be variable. Before I revise the code, d_ is a dimensionedScalar, locates in /opt/openfoam222/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel Code:
//- Characteristic diameter of phase Code:
//- Characteristic diameter of phase Code:
Foam::tmp<Foam::volScalarField> Foam::GidaspowSchillerNaumann::K Code:
SOURCE=dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam222/src/finiteVolume/lnInclude -I../phaseModel/lnInclude -IlnInclude -I. -I/opt/openfoam222/src/OpenFOAM/lnInclude -I/opt/openfoam222/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/GidaspowSchillerNaumann.o Actually my thought is very simple, in twoPhaseEulerFoam, particle's diameter is constant. you can set it in your transportDict. Well cua I wanna implant PBM into it, so this diameter should be variable. So I wanna implant PBM step by step. At first I should change this constant diameter to be changeable. This is why I revise the code. |
Hi,
you've changed d_ in header file but did not change initialization of the field in constructor, it still initialized like (phaseModel/phaseModel/phaseModel.C): Code:
... Problem appears here (interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C): Code:
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); |
Quote:
Yes, I also changed that. So phase.C is wmaked successfully. But when I wmake GidaspowSchillerNaumann.C, it failed. Code:
volScalarField Re(max(alpha2*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); You get my point, Thanks anyway. |
Well,
you can change Code:
volScalarField& d() Code:
const volScalarField& d() const Code:
tmp<volScalarField> d() const as you are trying to use it with just volScalarField& compiler complains about discarded const specifier. |
Quote:
|
All times are GMT -4. The time now is 08:20. |