modify scalarTransportFoam, problems need help
Dear all.
I want to modify the salarTransportFoam to solve another gas concentrate.My diffusion coefficient is changing with turbulence viscosity, so I write code like this: for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { solve ( fvm::ddt(Y) + fvm::div(phi, Y) - fvm::laplacian(nut/0.7, Y) ); } in creatFields file ,I add a virable : Info<< "Reading field Y\n" << endl; volScalarField Y ( IOobject ( "Y", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); but when I run ,it said mistake in fvSchemes in system dirctory: ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,Y) Gauss limitedLinear 1; } laplacianSchemes { default none; laplacian((nut/0.7), Y) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; Y ; } I need help very much. Thank you very much. |
when runing ,it displayed the following mistake:
ill defined primitiveEntry starting at keyword 'laplacian(nut' on line 37 and ending at line 59. file:/home/tiger/OpenFOAM/case/system/fvScheme at line 59. from function primitiveEntry::read Entry(const dictionary&, Istream&) in file db/dictionary/primeitiveEntry/primitiveEntry IO>C at ling 20 FOAM exiting. Why this happened. |
It seems to me that your are not allowed to use operators in the scheme dictionary, so in stead of
laplacian((nut/0.7), Y) Gauss linear corrected ; you could try laplacian(nut, Y) Gauss linear corrected ; Or define a new field kappat=nut/0.7 and use that instead. Cheers Eelco |
I think it will work with
Code:
laplacian((nut|0.7),Y) Gauss linear corrected; Jose Santos |
Usually, I would just delete the line you have added (making sure that the default is set to none).
When you run the solver, OpenFOAM will error and tell you that there is no laplacian scheme provided for a calculation which it will define in the output. If you just copy and paste this into your fvSchemes file and add the Gauss linear corrected after it, it should work. You can do this for other calculations that you need to provide. Example output below with the calculation to add to fvSchemes highlighted in bold(for pretty much the same problem): Courant Number mean: 0.439812 max: 15.7149 Time = 1001 keyword laplacian((DS0+(nut|Sct)),Species0) is undefined in dictionary "/home/jimmer/OpenFOAM/jimmer-1.6/run/indoor2/system/fvSchemes::laplacianSchemes" file: /home/jimmer/OpenFOAM/jimmer-1.6/run/indoor2/system/fvSchemes::laplacianSchemes from line 42 to line 42. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 388. FOAM exiting |
Quote:
my case can be run now. But when a little time has been going on , my residual doesn't change at all, and my result is not right compared with experiment data. DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.1568 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.15685 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.1569 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.15695 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.157 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.15705 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.1571 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.15715 DILUPBiCG: Solving for C, Initial residual = 9.99842e-07, Final residual = 9.99842e-07, No Iterations 0 Time = 0.1572 ...................... ...................... Could you tell me why this happens . |
Hi,
Maybe you could elaborate a little more on your problem. What quantities are you comparing with your experimental data? Regards, Jose Santos |
Quote:
|
Hi All,
If I want to solve 10 scalars (non-reactive species), which changes the effective density or viscosity of the solution as they get mixed in a reactor, how do I do that ? Also, if I want to include reactions with the associated scalars, how do I do that ? Please suggest. This is a very important problem I am currently stuck with. Best regards, Sanjib |
All times are GMT -4. The time now is 02:10. |