|
[Sponsors] |
May 8, 2013, 12:37 |
SetFieldsDict: Non uniform density
|
#1 |
New Member
Join Date: Jul 2012
Posts: 13
Rep Power: 13 |
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. |
|
May 8, 2013, 16:35 |
|
#2 |
New Member
Join Date: Jul 2012
Posts: 13
Rep Power: 13 |
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? |
|
Tags |
codestream; setfields; |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
T Junction Stability | ignacio | OpenFOAM Running, Solving & CFD | 5 | May 2, 2013 10:44 |
[swak4Foam] Air Conditioned room groovyBC | Sebaj | OpenFOAM Community Contributions | 7 | October 31, 2012 14: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 | Siemens | 6 | November 15, 2004 04:41 |