# Convection–diffusion equation solver

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 November 24, 2010, 16:24 Convection–diffusion equation solver #1 Senior Member   Daniele Join Date: Feb 2010 Posts: 134 Rep Power: 9 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,262 Rep Power: 23 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: 9 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,262 Rep Power: 23 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" <

 November 25, 2010, 10:04 #5 Senior Member   Daniele Join Date: Feb 2010 Posts: 134 Rep Power: 9 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,262 Rep Power: 23 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 Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Aurelien Thinat OpenFOAM Programming & Development 19 April 11, 2012 06:35 suitup OpenFOAM Running, Solving & CFD 0 January 20, 2010 08:45 Carola CFX 9 August 12, 2003 08:27 youngan CFX 0 July 1, 2003 23:32 suan Main CFD Forum 1 August 16, 2002 04:51

All times are GMT -4. The time now is 22:50.

 Contact Us - CFD Online - Privacy Statement - Top