CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

Scalar Field Source Terms

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   March 21, 2011, 10:45
Default Scalar Field Source Terms
New Member
Join Date: Mar 2011
Posts: 11
Rep Power: 6
tidal_Tom is on a distinguished road
I am trying to add source terms of K and epsilon using the explicitSource class found in /src/finiteVolume/cfdTools/general/fieldSources/basicSource/

I am not having much success, and I do not know if my method is correct?

I have modified the simpleFoam solver, using the SimpleWindFoam tutorial as a guide that is included with version 1.7.1.

I added the following to the header of simpleFoam.C

#include IObasicSourceList.H

added the following line at the end of createFileds.H

IObasicSourceList explicitSources(mesh)

and added mesh tools to the INC and LIBS in make/Options as in simpleWindFoam.

I have compiled the solver OK, and tried running the solver. It reads the sourceProperties file but gives an error saying 'Header not OK' when it gets to the fieldData (where the fields and source values are defined. fieldData is defined as:

k 1.2;
epsilon 0.5;

I am not sure why this doesn't work as I have successfully run the simpleWindFoam solver that uses the actuatorDisk source.

What have I missed? Is there a better way to add source terms?

many thanks
tidal_Tom is offline   Reply With Quote

Old   March 23, 2011, 06:25
Jim Knopf
Join Date: Dec 2010
Posts: 60
Rep Power: 6
JimKnopf is on a distinguished road
Maybe you can add your source term directly into the k and epsilion or what ever equation using fvm::SuSp() oder just fvm::Su() /fvm:::SP()
it depends.

Greetz Jim
JimKnopf is offline   Reply With Quote


actuator disk, source terms

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Source Terms in Star-CCM+ mk_mat CD-adapco 2 March 13, 2012 09:14
Source terms in local coordinate frames CF CFX 2 August 29, 2006 02:30
Displaying Source terms Chris FLUENT 0 June 14, 2006 15:20
Source Terms Rajan CFX 1 March 14, 2005 10:26

All times are GMT -4. The time now is 15:06.