CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

SetFieldsDict: Non uniform density

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 8, 2013, 12:37
Default SetFieldsDict: Non uniform density
  #1
New Member
 
Join Date: Jul 2012
Posts: 13
Rep Power: 4
physics1 is on a distinguished road
For my simulation I have a circular density area that i would like to put a
gaussian density distribution inside. To do this I am trying to use codestream inside the setFieldsDict. Below is what my dictionary looks like.

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
volScalarFieldValue rho 1
);

regions
(
sphereToCell
{
centre (0 0 0);
radius 1000;
fieldValues
(
#codeStream
{
codeOptions
#{

#};
codeInclude
#{

#};
code
#{

#};
}
volScalarFieldValue rho 100
);
}
);

But when I run setFields i keep getting this error:

wmake error: file 'Make/linuxGccDPOpt/objectFiles' could not be created in /home/adparo/Documents/MultiTest/multiTest2/dynamicCode/_a45e8e741fc6fd0ed5b8baeed94b2e884fb3af7e


--> FOAM FATAL IO ERROR:
Failed wmake "dynamicCode/_a45e8e741fc6fd0ed5b8baeed94b2e884fb3af7e/platforms/linuxGccDPOpt/lib/libcodeStream_a45e8e741fc6fd0ed5b8baeed94b2e884fb3 af7e.so"


file: /home/adparo/Documents/MultiTest/multiTest2/system/setFieldsDict from line 12 to line 14.

From function functionEntries::codeStream::execute(..)
in file db/dictionary/functionEntries/codeStream/codeStream.C at line 195.

FOAM exiting


Am I allowed to use codestream in setFields and if so what am i doing wrong.
physics1 is offline   Reply With Quote

Old   May 8, 2013, 16:35
Default
  #2
New Member
 
Join Date: Jul 2012
Posts: 13
Rep Power: 4
physics1 is on a distinguished road
So I edited the file so it now reads:

regions
(
sphereToCell
{
centre (0 0 0);
radius 1000;
fieldValues
(
#codeStream
{
codeOptions
#{
-I$WM_PROJECT_DIR/src/finiteVolume/fields/volFields\
-I$HOME/Documents
#};
codeInclude
#{
#include "volFields.H"
//#include "volFieldsFwd.H"
#};
code
#{
scalar x= 0;
//vector centre = (0 0 0);
//#include "createRad.H"
//volScalarField rhoi = 100*e^(-rad/1000)
#};
}
volScalarFieldValue rho 100
);
}


and is now giving me this error:

could not open file volFields.H for source file codeStreamTemplate.C
/home/adparo/Documents/MultiTest/multiTest2/system/setFieldsDict::#codeStream:32:23: fatal error: volFields.H: No such file or directory
compilation terminated.
make: *** [Make/linuxGccDPOpt/codeStreamTemplate.o] Error 1


--> FOAM FATAL IO ERROR:
Failed wmake "dynamicCode/_ab18aa727a6ee6ffed86f40a5f1c0c2b0a0197c7/platforms/linuxGccDPOpt/lib/libcodeStream_ab18aa727a6ee6ffed86f40a5f1c0c2b0a01 97c7.so"


file: /home/adparo/Documents/MultiTest/multiTest2/system/setFieldsDict from line 12 to line 14.
From function functionEntries::codeStream::execute(..)
in file db/dictionary/functionEntries/codeStream/codeStream.C at line 195.

FOAM exiting

I have the path to the exact file listed in codeOptions but it still cannot find the header file. What am I doing wrong?
physics1 is offline   Reply With Quote

Reply

Tags
codestream; setfields;

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
T Junction Stability ignacio OpenFOAM Running, Solving & CFD 5 May 2, 2013 10:44
Air Conditioned room groovyBC Sebaj OpenFOAM 7 October 31, 2012 15:16
Need help with boundary conditions: open to atmosphere Wolle OpenFOAM 2 April 11, 2011 07:32
rhoSimpleFoam claco OpenFOAM 7 April 20, 2010 04:32
Warning 097- AB CD-adapco 6 November 15, 2004 04:41


All times are GMT -4. The time now is 13:53.