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

fixedValue boundary condition with a time dependent value

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By fabian_roesler
  • 3 Post By fabian_roesler

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2015, 18:43
Default fixedValue boundary condition with a time dependent value
  #1
Member
 
methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 40
Rep Power: 10
meth is on a distinguished road
I want to impose a dirichlet boundary condition in Openfoam on the inlet patch with a time varying value calculated in each time step. For a example U = ( 1 y 0), where y is a value that I am calculating in each time step inside the solver. I know I have to use fixedValue type boundary condition which is uniform. Is there any inbuilt boundary condition which I can directly use or, do I need to create my own one? If I have to create a new boundary condition can you please give me some ideas and references.

Thank you 

Methma
meth is offline   Reply With Quote

Old   November 3, 2015, 03:38
Default
  #2
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
class Foam::uniformFixedValueFvPatchField< Type >

This boundary condition provides a uniform fixed value condition.

Example of the boundary condition specification:
Code:
myPatch
{
    type uniformFixedValue;
    uniformValue constant 0.2;
}
Note: The uniformValue entry is a DataEntry type, able to describe time varying functions. The example above gives the usage for supplying a constant value.

Search the Doxygen next time.

Cheers

Fabian
meth likes this.
fabian_roesler is offline   Reply With Quote

Old   November 3, 2015, 18:01
Smile
  #3
Member
 
methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 40
Rep Power: 10
meth is on a distinguished road
Hi Fabian,

Thank you for your reply

I am little confused about uniformFixedValue boundary condition. Can you please give more details about it.

My questions are;
What is the difference between fixedValue Boundary condition and uniformFixedValue boundary condition?
Can I impose this boundary condition for the vector field, U?
If so, how should I describe the uniformValue?
I want to set U=[1 y 0], where y changes in each time step, and the values of y can be find from a dictionary. Do you know how to do this?
Thank you again

Best,
Methma
meth is offline   Reply With Quote

Old   November 4, 2015, 02:43
Default
  #4
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi Methma

On the OpenFOAM page and in this forum you can find the following links:
http://www.openfoam.org/version2.1.0...conditions.php
http://www.cfd-online.com/Forums/ope...condition.html
http://www.cfd-online.com/Forums/ope...how-field.html

They will give enough information and eventually will point you to a tutorial for this BC.

Here is the velocity BC for your problem:
Code:
type uniformFixedValue;
uniformValue table       
(       
    ( 0 (1 0 0))
    (10 (1 1 0))
    (20 (1 2 0))
    (xy (1 z 0))
);
first column is the time, second column is the velocity vector in brackets.

Cheers

Fabian
Artur, BlnPhoenix and meth like this.
fabian_roesler is offline   Reply With Quote

Old   November 4, 2015, 17:41
Default
  #5
Member
 
methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 40
Rep Power: 10
meth is on a distinguished road
Thank you very much Fabian I did it.

Last edited by meth; November 5, 2015 at 00:03.
meth is offline   Reply With Quote

Old   November 5, 2015, 21:58
Default
  #6
Member
 
methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 40
Rep Power: 10
meth is on a distinguished road
Hi Fabian,

We can you uniformFixedValue boundary condition to obtain a time dependent dirichlet boundary condition on a patch. I am setting uniformValue to tableFile in my simulations. If I update the tablefile with time dose it automatically update the boundary values in each time step? or It always proceed with the data in the tablefile stored at the beginning?

I think it does not read the table file in each time step.

Best,

Methma
meth is offline   Reply With Quote

Old   December 11, 2015, 04:45
Default
  #7
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Sorry for the late response. I guess you are right. The table is not run-time-modifiable.

Cheers

Fabian
fabian_roesler is offline   Reply With Quote

Old   February 26, 2022, 04:44
Default
  #8
New Member
 
Feng
Join Date: Aug 2021
Posts: 8
Rep Power: 4
fengyi is on a distinguished road
Hi Methma
I meet this problem, too. I'd like to change the boundary condtion accoring to some value calculated from last time step, and I have no idea about how to make the boundary condition be run-time-adjustable.

Have you solved this problem? Could you please show me the idea? Or, can some seniors having a solution to this problem give me some advices?

Thank you.


Best regards,

Feng
fengyi is offline   Reply With Quote

Old   March 15, 2022, 22:40
Default
  #9
New Member
 
Join Date: Mar 2022
Posts: 2
Rep Power: 0
leorasy89 is on a distinguished road
Thank you for sharing, they are very helpful for me
__________________
2048 cupcakes fnaf 2
leorasy89 is offline   Reply With Quote

Old   March 16, 2022, 00:01
Default
  #10
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
@Feng

A very easy way would be a batch job
- calculating to some destination time
- calculated the new b.c. outside OF and write it in the "last time" folder
- calculate the next time period.

You may set the calculated times as short as your accuracy needs.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   March 17, 2022, 07:48
Default
  #11
New Member
 
Feng
Join Date: Aug 2021
Posts: 8
Rep Power: 4
fengyi is on a distinguished road
Quote:
Originally Posted by piu58 View Post
@Feng

A very easy way would be a batch job
- calculating to some destination time
- calculated the new b.c. outside OF and write it in the "last time" folder
- calculate the next time period.

You may set the calculated times as short as your accuracy needs.
Dear Pilz
Thanks for your reply.
It is a practical solution for this problem. I am thinking about performing this process automatically:
(1)---use functions in CONTROlDICT to calculate the boundary condition(such as magnitude of incoming velocity) at the end of every time step, and output it as a txt in the home directory.
(2)---the boundary condition read the information provided by txt at the beginning of the next time step to be run-time-adjustable.
(3)---run next time step according to the new boundary condition.
(4)---finish the next time step and repeat(1)

I have no idea about process(3). As I am a fresh man about Foam, I don't know how to code the boundary condition to make the it read the infomation provided by the txt in the home directory constantly.
I try to use the (#include 'the txt') in the boundary contion to read the infomation(maybe stupid or even wrong, forgive me), but I fail. Because the syntax (#include 'the txt') will be replaced with the information provided in the txt, so the (#include 'the txt') only work once at the first time step. Is there exist some function or syntax which can be used on this contion to read the information in the txt continuously during all the run time?


Best regards,

Feng
fengyi is offline   Reply With Quote

Old   May 25, 2023, 02:03
Default
  #12
New Member
 
Join Date: May 2023
Posts: 1
Rep Power: 0
victorable is on a distinguished road
Quote:
Originally Posted by fengyi View Post
Hi Methma
I meet this problem, too. I'd like to change the boundary condtion accoring to some value calculated from last time step, and I have no idea about how to make the boundary condition be run-time-adjustable Drift Boss.

Have you solved this problem? Could you please show me the idea? Or, can some seniors having a solution to this problem give me some advices?

Thank you.


Best regards,

Feng
Kind of like me when I'm trying to wait for a solution, but I'm in vain.
victorable is offline   Reply With Quote

Reply


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
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 07:30
How to export time series of variables for one point? mary mor OpenFOAM Post-Processing 8 July 19, 2017 10:54
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08
Setting boundary condition to follow a time series signal odellar OpenFOAM Pre-Processing 1 March 2, 2015 10:04
[swak4Foam] Air Conditioned room groovyBC Sebaj OpenFOAM Community Contributions 7 October 31, 2012 14:16


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