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

Process control functionObject

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2011, 12:34
Question Process control functionObject
  #1
New Member
 
Thiago Vetter
Join Date: Jan 2011
Location: Rio de Janeiro
Posts: 4
Rep Power: 15
Vetter is on a distinguished road
First of all, I'd like to stress that this is my very first post in this forum, despite the fact that I've consulted it several times to search for information regarding OpenFOAM.

Also, I'm quite new to OpenFOAM (i.e, a n00b) and perhaps some of my doubts and mistakes are quite elementary.

So, to my problem: my project consists of creating a piece of generic code to be used with any solver to simulate process control. By that I mean control of a measured variable (such as temperature, pressure or the magnitude of velocity in one point, or something more complex such as flux on a surface) by changing a variable on a boundary condition (such as, in a simple case, the velocity on a uniform patch field).

My first attempts of creating this generic piece of code is through a functionObject, based on the already existing "probes". However, "probes" acquires the fields from objectRegistry through a function that passes the fields as constant (the lookupObject function). And I've found no means to change these (now constant) fields.

So I ask: is a functionObject the way to go about it or not? It seems to me that if the only way for a functionObject to access fields is through objectRegistry, then it will be impossible to change these fields.

I would greatly appreciate any help and suggestions.
Vetter is offline   Reply With Quote

Old   January 14, 2011, 05:27
Default
  #2
Member
 
Andrea Petronio
Join Date: Mar 2009
Location: Trieste, Italy
Posts: 43
Rep Power: 17
andrea is on a distinguished road
Hi Thiago,
I was thinking to do something on process control in OF for a while. Maybe is not elegant
but to give it a start you could think simply of a boundary condition that reads the data you need and adjust itself. Should be not so difficult.

Hope it helps

Andrea
http://www.iefluids.com/home.html
http://poseidon.ogs.trieste.it/phd/fluid/
andrea is offline   Reply With Quote

Old   January 14, 2011, 08:08
Default
  #3
New Member
 
Thiago Vetter
Join Date: Jan 2011
Location: Rio de Janeiro
Posts: 4
Rep Power: 15
Vetter is on a distinguished road
Hi Andrea,

thank you for replying.

After not being able to figure out a way to implement process control through a functionObject (mostly because of what I described in the first post) I started implementing a boundary condition. I didn't finish writing it yet, but it seems as the most feasible way, and will be somewhat generic (regarding the controlled and manipulated fields/variables).
Vetter is offline   Reply With Quote

Old   January 14, 2011, 09:41
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Thiago: I've gotta a feeling that you're re-inventing the wheel... check if swak4foam doesn't have the whole artillery you're looking for. Quoting the wiki page for it:
Quote:
Originally Posted by http://openfoamwiki.net/index.php/Contrib/swak4Foam
A library that combines the functionality of groovyBC and funkySetFields.
It also depends on the simpleFunctionObjects-library. These are tools for generic/programmable boundary conditions (groovyBC), setting fields in a programmable way in the simulation volume (funkySetFields) and for monitoring and processing fields (both simpleFunctionObjects and swak4foam).

Best regards and good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 14, 2011, 11:38
Default
  #5
New Member
 
Thiago Vetter
Join Date: Jan 2011
Location: Rio de Janeiro
Posts: 4
Rep Power: 15
Vetter is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings to all!

@Thiago: I've gotta a feeling that you're re-inventing the wheel... check if swak4foam doesn't have the whole artillery you're looking for. Quoting the wiki page for it:
It also depends on the simpleFunctionObjects-library. These are tools for generic/programmable boundary conditions (groovyBC), setting fields in a programmable way in the simulation volume (funkySetFields) and for monitoring and processing fields (both simpleFunctionObjects and swak4foam).

Best regards and good luck!
Bruno
Hello Bruno,

I've seen swak4Foam and I do believe it would be able to perform the job for wich I'm programming this boundary condition. However, making a boundary condition for this specific end will possibly result in a better performance for simulation and in a C++ code that can be used for further development in this process control field.

Gschaider's words about swak4Foam not being the best tool for any job but a tool that will do practically any job comes to mind.

I do appreciate the input and if I should fail this programming task (as I'm not an experienced C++ programmer) I will use swak4Foam for the immediate parts of the project.

Best regards,
Thiago
Vetter is offline   Reply With Quote

Reply

Tags
functionobject, openfoam, process control

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control Volume , Finite Volume, Finite Control Volume, Finite Element Method technocrat.prakash Main CFD Forum 1 April 24, 2010 20:24
[Commercial meshers] Tgrid control surface for diagnostic purposes josp OpenFOAM Meshing & Mesh Conversion 0 November 20, 2008 06:36
Solid Timescale Control Parthipan CFX 2 August 24, 2007 11:07
maintaining a logarithmic velocity distribution Morten Andersen CFX 1 January 8, 2007 12:37
a grid error during solving process Tiefeng WANG CFX 2 June 14, 2002 10:07


All times are GMT -4. The time now is 13:20.