|
[Sponsors] |
November 24, 2010, 16:24 |
Convection–diffusion equation solver
|
#1 |
Senior Member
Daniele
Join Date: Feb 2010
Posts: 134
Rep Power: 16 |
Hi
I would create my solver for convectio-diffusion equation: Where v field is know. Where should I star to solve this problem? How can I create OpenFoam code? I would use simpleFoam to calculate U field and join simpleFoam solver with my solver to have only one solver to calculate scalar field c. Thanks |
|
November 25, 2010, 05:25 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29 |
Your problem is pretty much equivalent to this one: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam. Just instead of adding the equation to icoFoam, do so with simpleFoam.
|
|
November 25, 2010, 06:40 |
|
#3 |
Senior Member
Daniele
Join Date: Feb 2010
Posts: 134
Rep Power: 16 |
Thanks
Perfect, but in simpleFoam (or pisoFoam) where I add this line: dimensionedScalar nu ( transportProperties.lookup("nu") ); for my scalar transport properties? |
|
November 25, 2010, 09:54 |
|
#4 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29 |
I would add the following code to createFields.H:
Code:
Info<< "Reading transportProperties\n" << endl; IOdictionary transportProperties ( IOobject ( "transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); dimensionedScalar DC ( transportProperties.lookup("DC") ); Info<< "Reading field C\n" <<endl; volScalarField C ( IOobject ( "C", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); |
|
November 25, 2010, 10:04 |
|
#5 |
Senior Member
Daniele
Join Date: Feb 2010
Posts: 134
Rep Power: 16 |
Yes I just do it.
Then I would join electrostaticFoam with my_simpleFoam, so I'll modify createFieds.h and my_simpleFoam.c adding electrostaticFoam. It's correct? But can I impose different boundary condition on the same patch? Example: symmetryPlane for potential (for electric fields) and zeroGradient for U (Velocity fields) Thanks |
|
November 26, 2010, 06:21 |
|
#6 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29 |
Yes, of course boundary conditions are separate for every field. Otherwise you'd have a tough time even simulating a lid driven cavity
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Transport equation in chtMultiRegionSimpleFoam solver | Aurelien Thinat | OpenFOAM Programming & Development | 19 | April 11, 2012 07:35 |
Getting too many iterations by velocity solving (aborting). Changing U - Solver? | suitup | OpenFOAM Running, Solving & CFD | 0 | January 20, 2010 08:45 |
Solver Equations | Carola | CFX | 9 | August 12, 2003 09:27 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 2, 2003 00:32 |
parallelized equation solver | suan | Main CFD Forum | 1 | August 16, 2002 05:51 |