defining variables in funkySetFieldDict
I would like to define some variables and use them in the evaluation of 'expression' in 'funkySetFieldsDict'. I added it according to the example in www.openfoamworkshop.org/6th...2011/.../gschaider_slides.pdf as:
field alpha1 ;
keepPatches true ;
expression "width" ;
When I run funkySetFields the following error message always happens:
Create mesh for time = 0
Time = 0
Putting "width" into field alpha1 at t = "0" if condition "true" is true
Keeping patches unaltered
--> FOAM FATAL ERROR:
Parser Error at "1.0-4" :"field width not existing or of wrong type"
From function parsingValue
in file ValueExpressionDriver.C at line 84.
I will be very gratefull if somebody can help me to resolve this issue. Just to make sure, without attempting to define the variables funkySetFiles works fine. I am using OF1.7.
I wonder if your definition for width does not give 0 as a outcome, since you take the max of the local x-position (which is equal to the local x-position) and subtract the min of the local x-position (which is again equal to the local x-position).
Apart from that, it complains about the type of the field, perhaps that the type definition in your alpha1 field is not set to volScalarField.
For the rest I don't see anything wrong in your syntax, so it should work.
Thanks a lot for your response. I indeed used the stand alone FSF version.
Now with swak4Foam everything works.
|All times are GMT -4. The time now is 16:48.|