|
[Sponsors] |
March 5, 2013, 11:28 |
codeStream in SetFieldsDict
|
#1 |
New Member
Join Date: Jul 2012
Posts: 13
Rep Power: 14 |
Hi Everyone,
Im trying to initalize a non uniform density region inside set fields using the codeStream command shown below: defaultFieldValues ( volScalarFieldValue rho 1 ); regions ( sphereToCell { centre (0 0 0); radius 1000; fieldValues ( #codeStream { codeInclude #{ #include "createRad.H" #} code #{ volScalarFieldValue alpha1 10*e^(-rad/1000); #} } ); } ); but when I run setFields i get FOAM FATAL IO ERROR: 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 ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict or $WM_PROJECT_DIR/etc/controlDict 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. |
|
June 14, 2013, 11:58 |
|
#2 |
New Member
xiaoweii
Join Date: Mar 2012
Posts: 7
Rep Power: 14 |
Just follow the instructions in the error information:
adding to the InfoSwitches setting in the system controlDict(not the case controlDict): allowSystemOperations 1 |
|
Tags |
codestream, setfields |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
setFieldsDict, alpha1, free surface, wigley | kolloff | OpenFOAM Pre-Processing | 10 | April 3, 2015 06:05 |
Change deltaT using codeStream | whatsoever | OpenFOAM Running, Solving & CFD | 1 | April 30, 2013 03:53 |
Using #codeStream to set initial field for parallel run | Hisham | OpenFOAM Running, Solving & CFD | 7 | June 25, 2012 10:48 |
Using codestream in controlDict | pad | OpenFOAM Running, Solving & CFD | 0 | April 11, 2012 04:59 |
Bogus setFieldsDict in damBreak4phase{,Fine} tutorial cases | mwild | OpenFOAM Bugs | 1 | August 10, 2010 10:36 |