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

[swak4Foam] FunkySetFields dictionary

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 19, 2008, 08:36
Default FunkySetFields dictionary
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sara!

What exactly is the problem?
Does funkySetField stop with an error message? Or does ist simply not change your field? In the second case try a bigger radius. Maybe no cells (pos() uses the cell-center) were "caught" by your condition (one hint could be the output "condition ... true in 0 cells" or something like this)

Bernhard
__________________
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   November 19, 2008, 21:19
Default Oh sorry. FunkySetFields star
  #2
New Member
 
Sara Schairer
Join Date: Mar 2009
Posts: 26
Rep Power: 17
sara is on a distinguished road
Oh sorry.
FunkySetFields starts to get executed - that is the openfoam header appears. Then I get:

funkySetFields: time/latestTime option is required

From function main()
in file funkySetFields.C at line 210.

FOAM exiting

So it doesn't start to set any cells at all. Just complains abouth the missing time. But I wrote the time in the directory at every place I could think of and it gave me the same error message.
Any ideas?
sara is offline   Reply With Quote

Old   November 20, 2008, 05:30
Default Well. I think the error messag
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Well. I think the error message says it all: start FSF with -help. You will see that there is a -time and a -latestTime option. One of them has got to be specified (as you're doing ICs propably "-time 0").

The reason behind that is that I wanted the user to defintly tell the tool which time-step to manipulate (so that nobody can complain afterwards if FSF messed up a valuable/valid solution)

Bernhard
__________________
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   November 20, 2008, 15:37
Default Is there an installation guide
  #4
New Member
 
sesha
Join Date: Mar 2009
Posts: 23
Rep Power: 17
hamsadhwani8 is on a distinguished road
Is there an installation guide for funkySetFields?

I want to install it on mac os x 10.5. I am using openfoam 1.5

Thanks,
ss
hamsadhwani8 is offline   Reply With Quote

Old   November 20, 2008, 20:06
Default Yeah, sorry, I got it. I didn'
  #5
New Member
 
Sara Schairer
Join Date: Mar 2009
Posts: 26
Rep Power: 17
sara is on a distinguished road
Yeah, sorry, I got it. I didn't realize that I have to add the time in the command line, I thought I could add it in the dictionary. It works fine now.
However I have another question, maybe you have some ideas about it:
I want to insert many little droplets (that is: spheres) at my inlet. Of course I could just write them one after another in the dictionary, but since I'm thinking of a number around 400, this doesn't seem like a good idea.
Can you give me some advice what to do instead? I thought about a random distribution, but I don't know how to integrate this in the "condition"-expression.
Cheers, Sara
sara is offline   Reply With Quote

Old   November 21, 2008, 10:46
Default Hi Sara! I'm afraid stuff l
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sara!

I'm afraid stuff like loops won't work with funkySetFields (and who was there in the back shouting "And if there was a scripting facility in FSF, Bernhard would have used that children's language (what's it called? Cobra, Mamba or so) not proper C++". Show yourself).

If your points are regulary spaced something using a modulo operator (%) could work, but I'm not quite sure whether that operator is implemented in FSF. Will check

Bernhard
__________________
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   November 23, 2008, 20:14
Default Hi Bernhard Thanks for your a
  #7
New Member
 
Sara Schairer
Join Date: Mar 2009
Posts: 26
Rep Power: 17
sara is on a distinguished road
Hi Bernhard
Thanks for your answer. That would be great if you could find out about the modulo operator.
If the points are regularly spaced that's alright.
Thanks for helping me, Sara
sara is offline   Reply With Quote

Old   November 24, 2008, 05:23
Default Hi Sara! I checked. There c
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sara!

I checked. There currently is no modulo-operator in FSF

Bernhard
__________________
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   December 1, 2008, 18:00
Default Hi Sara! Now there is (a mo
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sara!

Now there is (a modulo operator). Please see the Wiki page and get the recent version from the SVN

Bernhard
__________________
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   December 2, 2008, 02:13
Default Hi Bernhard Many thanks! Sor
  #10
New Member
 
Sara Schairer
Join Date: Mar 2009
Posts: 26
Rep Power: 17
sara is on a distinguished road
Hi Bernhard
Many thanks!
Sorry for bothering you with this, but after some thinking I still don't get it how the modulo operator will be of any use to my problem if loops don't work.
My expression which sets the location of the droplet in FunkySetFields looks like this:

condition "mag( pos() - vector(0,0,0))<1e-03":

Now I want to keep x = 0 and y and z to increase up to 0.1.
I've done this "by hand" so far. I just repeated the whole expression a 100 times.
But I can't see how I can achieve the same using modulo. Could you please give me a hint?
Cheers, Sara
sara is offline   Reply With Quote

Old   December 2, 2008, 06:06
Default Hi Sara! For instance to bu
  #11
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sara!

For instance to build a "grid" of droplets with a spacing (4,5,0) and a radius 1 you could use a condition like this:

"mag(vector(pos().x % 4,pos().y % 5,0))<1"

(I hope you get the idea. Test the subexpression "pos().x % 4" to understand how it works)

Bernhard
__________________
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   December 2, 2008, 22:56
Default Hi Bernhard Thanks for your a
  #12
New Member
 
Sara Schairer
Join Date: Mar 2009
Posts: 26
Rep Power: 17
sara is on a distinguished road
Hi Bernhard
Thanks for your answer.
I got the most recent version of funkySetFields and tried this, but when using the modulo operator (%) I get: Parser Error "invalid character".
I tried exactly the condition you wrote above. So it looks like it doesn't know the % expression.
Why is that? I got funkySetFields using svn, executed insertGenerated.sh and compiled it. It did give some warnings while compiling though..
Do you have some advice what is wrong here?
Cheers, Sara
sara is offline   Reply With Quote

Old   December 2, 2008, 23:11
Default Ps I had a look at the ValueE
  #13
New Member
 
Sara Schairer
Join Date: Mar 2009
Posts: 26
Rep Power: 17
sara is on a distinguished road
Ps
I had a look at the ValueExpressionLexer.ll where all the expression syntax is in. I didn't see the module operator in there.
Am I looking for the wrong ( = old) version?
I got the one from the wiki which says:
The most recent version of the sources....
Should be alright, shouldn't it?
Cheers, Sara
sara is offline   Reply With Quote

Old   December 3, 2008, 14:37
Default Hi Sara! The Version of FSF
  #14
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sara!

The Version of FSF I'm currently maintaining is the one in the 1.5-svn (the first one in the Download-section on the Wiki)

Forgot to add the generated files. Added them to the SVN

Bernhard
__________________
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   December 3, 2008, 22:13
Default Thanks Bernhard It works fine
  #15
New Member
 
Sara Schairer
Join Date: Mar 2009
Posts: 26
Rep Power: 17
sara is on a distinguished road
Thanks Bernhard
It works fine now.
Cheers, Sara
sara is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ill defined primitiveEntry starting at keyword 'value' on line 197 ChangeDictionary Struggle_Achieve OpenFOAM Pre-Processing 2 December 20, 2017 04:58
writing subDict in a dictionary ubaid OpenFOAM Programming & Development 3 October 25, 2014 18:17
New Boundary Condition: Reading Dictionary Problem Koga OpenFOAM Programming & Development 0 November 26, 2012 06:01
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
FoamX error aachenBomb case Ervin Adorean (Adorean) OpenFOAM Pre-Processing 13 March 7, 2005 04:50


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