CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] using toPoints at funkySetFields

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 12, 2012, 11:36
Default using toPoints at funkySetFields
  #1
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 10
fisch is on a distinguished road
Hi,

I try using the toPoints Method for initialising my pointMotionU field because if i don't do it the following error occurs:
Code:
--> FOAM FATAL ERROR: 
 inconsistent types: pointMotionU is  pointVectorField while the expression evaluates to a volVectorField

    From function doAnExpression()
    in file funkySetFields.C at line 328.
So i think i should use the toPoints(...) function in my funkySetFieldsDict like
Code:
      setPointMotionUstart
    {
        field pointMotionU;
        expression "vector(toPoint(0),toPoint(0.5e-1) * toPoint(pi) * (toPoint(0.1e1) - toPoint(pos().y)),toPoint(0)) ";
        keepPatches true;
    }
But now, the following error occurs:
Code:
--> FOAM FATAL ERROR: 
 Parser Error at "1.8-14" :"field toPoint not existing or of wrong type"
"vector(toPoint(0),toPoint(0.5e-1) * toPoint(pi) * (toPoint(0.1e1) - toPoint(pos().y)),toPoint(0)) "
"        ^^^^^^^                                                                                   "

    From function parsingValue
    in file lnInclude/CommonValueExpressionDriverI.H at line 802.

FOAM exiting
Is there some mistake on my side or is it simply not possible to work like this??

Is it maybe something for the mantis bugtracker?

Thanks a lot
fisch is offline   Reply With Quote

Old   April 12, 2012, 18:48
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,048
Rep Power: 43
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by fisch View Post
Hi,

I try using the toPoints Method for initialising my pointMotionU field because if i don't do it the following error occurs:
Code:
--> FOAM FATAL ERROR: 
 inconsistent types: pointMotionU is  pointVectorField while the expression evaluates to a volVectorField

    From function doAnExpression()
    in file funkySetFields.C at line 328.
So i think i should use the toPoints(...) function in my funkySetFieldsDict like
Code:
      setPointMotionUstart
    {
        field pointMotionU;
        expression "vector(toPoint(0),toPoint(0.5e-1) * toPoint(pi) * (toPoint(0.1e1) - toPoint(pos().y)),toPoint(0)) ";
        keepPatches true;
    }
But now, the following error occurs:
Code:
--> FOAM FATAL ERROR: 
 Parser Error at "1.8-14" :"field toPoint not existing or of wrong type"
"vector(toPoint(0),toPoint(0.5e-1) * toPoint(pi) * (toPoint(0.1e1) - toPoint(pos().y)),toPoint(0)) "
"        ^^^^^^^                                                                                   "

    From function parsingValue
    in file lnInclude/CommonValueExpressionDriverI.H at line 802.

FOAM exiting
Is there some mistake on my side or is it simply not possible to work like this??

Is it maybe something for the mantis bugtracker?

Thanks a lot
Due to historical reason (groovyBC and funkySetFields started out as two different projects) there are inconsistencies between the two grammars. In the field grammar there is

- "point(3.4)" this only works for a scalar (no expressions or anything)
- "interpolateToPoint(0.1e1-pos().y)" this works for any expression

Yes. A Mantis bug "Clean up this unholy mess in the grammars" might speed this up (although your immediate problem should be solved)
gschaider is offline   Reply With Quote

Old   August 4, 2013, 05:59
Default
  #3
Member
 
Mohammad Bahreini
Join Date: Dec 2012
Posts: 36
Rep Power: 7
mecman is on a distinguished road
Hi all
i want use of FunkySetFields for may case in OpenFoam2.1.1,i instal swak4Foam for this version witout problem,i made FunkySetFieldsDict for my case and after when i run that i see this problem

--> FOAM FATAL ERROR:
funkySetFields: time/latestTime option is required
From function main()
in file funkySetFields.C at line 641.
FOAM exiting
what is my mistake?
mecman is offline   Reply With Quote

Old   August 4, 2013, 13:20
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,048
Rep Power: 43
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by mecman View Post
Hi all
i want use of FunkySetFields for may case in OpenFoam2.1.1,i instal swak4Foam for this version witout problem,i made FunkySetFieldsDict for my case and after when i run that i see this problem

--> FOAM FATAL ERROR:
funkySetFields: time/latestTime option is required
From function main()
in file funkySetFields.C at line 641.
FOAM exiting
what is my mistake?
Please don't post the same question in multiple threads and don't hijack threads whose topic is not related to your problem (which could have been easily solved by actually READING the error message)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   August 4, 2013, 13:28
Default
  #5
Member
 
Mohammad Bahreini
Join Date: Dec 2012
Posts: 36
Rep Power: 7
mecman is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Please don't post the same question in multiple threads and don't hijack threads whose topic is not related to your problem (which could have been easily solved by actually READING the error message)
Sorry man...:
mecman is offline   Reply With Quote

Reply

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
[swak4Foam] funkySetFields and funkySetBoundaryFields zxj160 OpenFOAM Community Contributions 19 February 14, 2018 20:07
[swak4Foam] how to use funkySetFields function in muliregion case bryant_k OpenFOAM Community Contributions 12 August 1, 2016 04:40
[swak4Foam] funkySetFields: problem with processor boundary nmikhailov OpenFOAM Community Contributions 4 May 26, 2015 09:48
[swak4Foam] groovyBC and funkySetFields married and got a kid named swak4Foam gschaider OpenFOAM Community Contributions 164 January 13, 2015 03:52
[swak4Foam] Cartesian to polar using FunkySetFields >>> Division by zero pagru OpenFOAM Community Contributions 3 October 1, 2014 18:30


All times are GMT -4. The time now is 16:25.