|
[Sponsors] |
September 12, 2010, 06:50 |
Trouble with Field Functions
|
#1 |
New Member
F
Join Date: Aug 2010
Posts: 3
Rep Power: 16 |
Hi all,
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. Thank you! -Stefanus |
|
September 13, 2010, 09:29 |
|
#2 |
New Member
Join Date: Mar 2009
Posts: 20
Rep Power: 17 |
Hi falkin,
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. Regards xamo |
|
October 6, 2010, 09:15 |
|
#3 |
New Member
Join Date: Jul 2010
Posts: 11
Rep Power: 16 |
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 cheers Andreas |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to calculate pressure forces using custom field functions? | tsagaro | FLUENT | 7 | June 23, 2017 16:45 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Thresholds and field functions | tobe | STAR-CCM+ | 0 | September 8, 2010 03:25 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |