CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

modify scalarTransportFoam, problems need help

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 19, 2009, 01:03
Default modify scalarTransportFoam, problems need help
  #1
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 16
panda60 is on a distinguished road
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.
panda60 is offline   Reply With Quote

Old   November 19, 2009, 19:39
Default
  #2
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 16
panda60 is on a distinguished road
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.
panda60 is offline   Reply With Quote

Old   November 20, 2009, 03:58
Default
  #3
Senior Member
 
Eelco van Vliet
Join Date: Mar 2009
Location: The Netherlands
Posts: 124
Rep Power: 19
eelcovv is on a distinguished road
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
eelcovv is offline   Reply With Quote

Old   November 20, 2009, 04:22
Default
  #4
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
I think it will work with
Code:
laplacian((nut|0.7),Y) Gauss linear corrected;
Regards,
Jose Santos
santos is offline   Reply With Quote

Old   November 20, 2009, 14:33
Default
  #5
New Member
 
James Nally
Join Date: Apr 2009
Posts: 7
Rep Power: 17
jnally is on a distinguished road
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 14:36. Reason: Adding output
jnally is offline   Reply With Quote

Old   December 2, 2009, 23:46
Default
  #6
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 16
panda60 is on a distinguished road
Quote:
Originally Posted by santos View Post
I think it will work with
Code:
laplacian((nut|0.7),Y) Gauss linear corrected;
Regards,
Jose Santos
Dear Jose Santos:

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 .
panda60 is offline   Reply With Quote

Old   December 3, 2009, 04:40
Default
  #7
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hi,

Maybe you could elaborate a little more on your problem. What quantities are you comparing with your experimental data?

Regards,
Jose Santos
santos is offline   Reply With Quote

Old   December 3, 2009, 23:24
Default
  #8
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 16
panda60 is on a distinguished road
Quote:
Originally Posted by santos View Post
Hi,

Maybe you could elaborate a little more on your problem. What quantities are you comparing with your experimental data?

Regards,
Jose Santos
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.
panda60 is offline   Reply With Quote

Old   December 4, 2009, 12:30
Default
  #9
New Member
 
Sanjib Das Sharma
Join Date: May 2009
Posts: 22
Rep Power: 16
sanjibdsharma is on a distinguished road
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
sanjibdsharma is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ScalarTransportFoam for RTD calculations santoo_cfd OpenFOAM Running, Solving & CFD 39 July 12, 2021 01:15
ScalarTransportFoam and turbulent diffusion coefficient rybakov2 OpenFOAM Running, Solving & CFD 2 June 24, 2014 14:21
Needed Benchmark Problems for FSI Mechstud Main CFD Forum 4 July 26, 2011 12:13
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55
Some problems with Star CD Micha Siemens 0 August 6, 2003 13:55


All times are GMT -4. The time now is 09:01.