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

swak4foam

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

Like Tree2Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   May 24, 2012, 06:46
Default
  #21
New Member
 
Tom Schmitz
Join Date: Mar 2011
Posts: 19
Rep Power: 6
Zuixy is on a distinguished road
Thank you. You helped me a lot. I think i understand now how it works.

Unfortunately it doesn't work at all with potentialWaveFoam. I try to figure out why and will post it, if i succeed.


Zuixy is offline   Reply With Quote

Old   December 15, 2012, 05:43
Default swak4foam
  #22
New Member
 
Sahar
Join Date: Oct 2012
Posts: 2
Rep Power: 0
S.Jafari is on a distinguished road
hi
im new in openFoam too. im trying to simulate falling droplet. for having a set of results i use swak4foam to get the information of field deitalls. i wrote the function for calculating mass center of falling drop. now i want to find some other variables in each time step (such as velocity) using the mass center that i found as i said.
explaining more:
i wrote function for calculating mass center in each step time (x)
now i want to use x to calculate velocity in this formulation: v=[x(2)-x(1)]/deltaT
how can i match these function in control dict?
S.Jafari is offline   Reply With Quote

Old   December 16, 2012, 20:32
Default
  #23
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by S.Jafari View Post
hi
im new in openFoam too. im trying to simulate falling droplet. for having a set of results i use swak4foam to get the information of field deitalls. i wrote the function for calculating mass center of falling drop. now i want to find some other variables in each time step (such as velocity) using the mass center that i found as i said.
explaining more:
i wrote function for calculating mass center in each step time (x)
now i want to use x to calculate velocity in this formulation: v=[x(2)-x(1)]/deltaT
how can i match these function in control dict?
One possibility would be to use a storedVariable (this is just a sketch):

Code:
variables (
  "newPos= <however you calculate your mass centern>;"
  "velocity=(newPos-oldPos)/deltaT();"
  "oldPos=newPos;"
);
expression "velocity";
storedVariables (
  {
     name oldPos;
    initialValue "vector(0,0,0)";
);
Initial value is the tricky part because that might cause a velocity "jump" in the beginning

Or you can always load the positions you calculated into a spreadsheet and do the calculation there
S.Jafari likes this.
__________________
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 17, 2012, 02:39
Default
  #24
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,124
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
missed a }
thank you for your reply
Quote:
variables ( "newPos= <however you calculate your mass centern>;" "velocity=(newPos-oldPos)/deltaT();" "oldPos=newPos;" ); expression "velocity"; storedVariables ( { name oldPos; initialValue "vector(0,0,0)";
}
);
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is online now   Reply With Quote

Old   December 17, 2012, 05:16
Default
  #25
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by nimasam View Post
missed a }
thank you for your reply
That's what I mean with "just a sketch"
nimasam likes this.
__________________
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 20, 2012, 05:53
Default
  #26
New Member
 
Sahar
Join Date: Oct 2012
Posts: 2
Rep Power: 0
S.Jafari is on a distinguished road
thank you so much for the answer
S.Jafari is offline   Reply With Quote

Old   August 4, 2013, 05:57
Default
  #27
Member
 
Mohammad Bahreini
Join Date: Dec 2012
Posts: 35
Rep Power: 4
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, 06:08
Default
  #28
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,124
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
you should enter time argument
Quote:
funkySetFields -time 0
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is online now   Reply With Quote

Old   August 4, 2013, 11:40
Default
  #29
Member
 
Mohammad Bahreini
Join Date: Dec 2012
Posts: 35
Rep Power: 4
mecman is on a distinguished road
Quote:
Originally Posted by nimasam View Post
you should enter time argument
thnax nima...i found it...
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 building problem GGerber OpenFOAM Installation 54 April 24, 2015 16:02
groovyBC and funkySetFields married and got a kid named swak4Foam gschaider OpenFOAM 164 January 13, 2015 03:52
swak4Foam compilation problem ganeshv OpenFOAM Running, Solving & CFD 5 November 11, 2011 17:39
Swak4foam: get the value of a field in the neighbour cell of a patch face miles_davis OpenFOAM Pre-Processing 7 October 5, 2011 11:57
swak4Foam for faceZones andrea.pasquali OpenFOAM 3 August 30, 2011 11:24


All times are GMT -4. The time now is 14:21.