|
[Sponsors] |
modify scalarTransportFoam, problems need help |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 19, 2009, 02:03 |
modify scalarTransportFoam, problems need help
|
#1 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
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. |
|
November 19, 2009, 20:39 |
|
#2 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
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. |
|
November 20, 2009, 04:58 |
|
#3 |
Senior Member
Eelco van Vliet
Join Date: Mar 2009
Location: The Netherlands
Posts: 124
Rep Power: 19 |
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 |
|
November 20, 2009, 05:22 |
|
#4 |
Senior Member
|
I think it will work with
Code:
laplacian((nut|0.7),Y) Gauss linear corrected; Jose Santos |
|
November 20, 2009, 15:33 |
|
#5 |
New Member
James Nally
Join Date: Apr 2009
Posts: 7
Rep Power: 17 |
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 Last edited by jnally; November 20, 2009 at 15:36. Reason: Adding output |
|
December 3, 2009, 00:46 |
|
#6 | |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
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 . |
||
December 3, 2009, 05:40 |
|
#7 |
Senior Member
|
Hi,
Maybe you could elaborate a little more on your problem. What quantities are you comparing with your experimental data? Regards, Jose Santos |
|
December 4, 2009, 00:24 |
|
#8 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
I am sorry ,it is my mistake. I change residual from 1e-6 to 1e-10 , now the simulation is going on . Thank you for your kind hearted.
|
|
December 4, 2009, 13:30 |
|
#9 |
New Member
Sanjib Das Sharma
Join Date: May 2009
Posts: 22
Rep Power: 17 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ScalarTransportFoam for RTD calculations | santoo_cfd | OpenFOAM Running, Solving & CFD | 39 | July 12, 2021 02:15 |
ScalarTransportFoam and turbulent diffusion coefficient | rybakov2 | OpenFOAM Running, Solving & CFD | 2 | June 24, 2014 15:21 |
Needed Benchmark Problems for FSI | Mechstud | Main CFD Forum | 4 | July 26, 2011 13:13 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |
Some problems with Star CD | Micha | Siemens | 0 | August 6, 2003 14:55 |