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

Time varying boundary conditions, function of a measurement

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2014, 06:45
Default Time varying boundary conditions, function of a measurement
  #1
Member
 
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 12
odellar is on a distinguished road
Hi,

I want to implement a time varying boundary condition which simply varies the velocity magnitude as a function of some measurement - i.e. closed-loop control.

So whilst running a solver (PIMPLE in my case) I want a probe to save a value (for example a pressure measurement) at each time step, then the ability to perform some mathematical operation on this value, determining the velocity magnitude of my particular boundary for the next time step, then to set this velocity for the next time step.

Can anyone help me out with this?

Thanks a lot, Olie
odellar is offline   Reply With Quote

Old   May 13, 2014, 09:44
Default
  #2
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
hello,
GroovyBC can do this, check the wiki.

Regards,
Olivier
olivierG is offline   Reply With Quote

Old   May 15, 2014, 06:00
Default
  #3
Member
 
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 12
odellar is on a distinguished road
Thanks Olivier, this looks promising.

Regards,
Olie

Quote:
Originally Posted by olivierG View Post
hello,
GroovyBC can do this, check the wiki.

Regards,
Olivier
odellar is offline   Reply With Quote

Old   June 17, 2014, 05:53
Default Implementing with groovyBC
  #4
Member
 
Olie
Join Date: Oct 2013
Posts: 51
Rep Power: 12
odellar is on a distinguished road
Hi,

I've now got (I think) swak4FOAM properly installed and wish to have a go with this.

If I have a boundary (let's call it actuator) whose velocity I want to set using groovyBC based on an expression involving the pressure recorded by a probe (let's call it probe1), how can I do this?

My thinking is in the file case/0/U change the actuator boundary field to something like:

Code:
actuator
    {
    type                     groovyBC;
    valueExpression        "0.5*(probeReading)"; // Some function of the probe recording
    variables                "probeReading *** NOT SURE HOW TO DO THIS? ***
    value                     uniform (0 0 0);
    }
and it needs to use the current time step's probeReading value such that it updates the boundary condition based on the mathematical function of this value for the next timestep.

Can anyone help me with this?

Thanks a lot in advance,
Olie
odellar is offline   Reply With Quote

Old   May 16, 2019, 15:20
Default
  #5
New Member
 
Hao Li
Join Date: May 2017
Posts: 7
Rep Power: 8
haolee0928 is on a distinguished road
Quote:
Originally Posted by odellar View Post
Hi,

I want to implement a time varying boundary condition which simply varies the velocity magnitude as a function of some measurement - i.e. closed-loop control.

So whilst running a solver (PIMPLE in my case) I want a probe to save a value (for example a pressure measurement) at each time step, then the ability to perform some mathematical operation on this value, determining the velocity magnitude of my particular boundary for the next time step, then to set this velocity for the next time step.

Can anyone help me out with this?

Thanks a lot, Olie







Hi, have you finishe it? I am doing the same simulations.
haolee0928 is offline   Reply With Quote

Reply

Tags
closed-loop, variable bc


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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07


All times are GMT -4. The time now is 07:17.