CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

codeStream in SetFieldsDict

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

LinkBack Thread Tools Display Modes
Old   March 5, 2013, 11:28
Default codeStream in SetFieldsDict
New Member
Join Date: Jul 2012
Posts: 13
Rep Power: 7
physics1 is on a distinguished road
Hi Everyone,
Im trying to initalize a non uniform density region inside set fields using the codeStream command shown below:

volScalarFieldValue rho 1

centre (0 0 0);
radius 1000;
#include "createRad.H"
volScalarFieldValue alpha1 10*e^(-rad/1000);



but when I run setFields i get

Loading a shared library using case-supplied code is not enabled by default
because of security issues. If you trust the code you can enable this
facility be adding to the InfoSwitches setting in the system controlDict:

allowSystemOperations 1
The system controlDict is either

file: /home/adparo/Documents/MultiTest/multiTest2/system/setFieldsDict from line 10 to line 15.
From function functionEntries::codeStream::execute(..)
in file db/dynamicLibrary/dynamicCode/dynamicCode.C at line 81.

FOAM exiting

Is it possible to use codestream in setFields and if not is there another way to do this? Later on i need to initalize with multiple density regions on my mesh each with different densities.
physics1 is offline   Reply With Quote

Old   June 14, 2013, 10:58
New Member
Join Date: Mar 2012
Posts: 7
Rep Power: 7
xiaow_g is on a distinguished road
Just follow the instructions in the error information:
adding to the InfoSwitches setting in the system controlDict(not the case controlDict):
allowSystemOperations 1
xiaow_g is offline   Reply With Quote


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
setFieldsDict, alpha1, free surface, wigley kolloff OpenFOAM Pre-Processing 10 April 3, 2015 05:05
Change deltaT using codeStream whatsoever OpenFOAM Running, Solving & CFD 1 April 30, 2013 02:53
Using #codeStream to set initial field for parallel run Hisham OpenFOAM Running, Solving & CFD 7 June 25, 2012 09:48
Using codestream in controlDict pad OpenFOAM Running, Solving & CFD 0 April 11, 2012 03:59
Bogus setFieldsDict in damBreak4phase{,Fine} tutorial cases mwild OpenFOAM Bugs 1 August 10, 2010 09:36

All times are GMT -4. The time now is 18:01.