|September 12, 2010, 05:50||
Trouble with Field Functions
Join Date: Aug 2010
Posts: 3Rep Power: 7
I working on a project as part of my undergrad BE degree, i am trying to simulate the movement of air caused by a vibrating piezoelectric cantilever beam.
So far I have approached the problem in a similar manner as to that used in the contracting cylinder tutorial in the user guide.
I am able to get my beam to deflect in one direction based on a simple y=x^2 curve.
Now the next step is to make the beam deflect back and forth (like a Japanese fan) , however i am unable to get this to work with field functions, is there a way you can code loops and while statements in there?
I was also attempting to create user coded functions but am unable to get this set up as explained in the user guide especially where it describes Library registrations etc...
Could anyone shed any light on this issue or have better ideas of how to solve this problem.
|September 13, 2010, 08:29||
Join Date: Mar 2009
Posts: 20Rep Power: 8
I asked the question about loops in a field function the adapco support some weeks ago. They said, it is not possible to do loops in field functions. You can do some if then loops (using the "?", e.g. Tutorial Cavitation) but thats it.
So I think you have to use the user coding, but I have no experience with that.
|October 6, 2010, 08:15||
Join Date: Jul 2010
Posts: 11Rep Power: 7
User coding would not be the means of choice. You can do loops in Java macros, which is something different.
But I think the easiest way would be to implement an if statement in you fieldfunction.
I'm not sure how you achieved the bending of your beam.
If you applied a force then it might look like the following
E. g. if maximum displacement of the beam is greater than a certain value then the force is pointing in the other direction.
You can get the maximum displacement by means of a report
|Thread||Thread Starter||Forum||Replies||Last Post|
|Moving mesh||Niklas Wikstrom (Wikstrom)||OpenFOAM Running, Solving & CFD||122||June 15, 2014 06:20|
|How to calculate pressure forces using custom field functions?||tsagaro||FLUENT||6||April 13, 2011 04:03|
|Thresholds and field functions||tobe||STAR-CCM+||0||September 8, 2010 02:25|
|Help with Field Functions||CFD_Jimmy||Main CFD Forum||0||March 30, 2010 10:47|
|Problem with rhoSimpleFoam||matteo_gautero||OpenFOAM Running, Solving & CFD||0||February 28, 2008 07:51|