|
[Sponsors] |
fixedValue boundary condition with a time dependent value |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 2, 2015, 19:43 |
fixedValue boundary condition with a time dependent value
|
#1 |
Member
methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 40
Rep Power: 11 |
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 |
|
November 3, 2015, 04:38 |
|
#2 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
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; } Search the Doxygen next time. Cheers Fabian |
|
November 3, 2015, 19:01 |
|
#3 |
Member
methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 40
Rep Power: 11 |
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?Thank you again Best, Methma |
|
November 4, 2015, 03:43 |
|
#4 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
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)) ); Cheers Fabian |
|
November 4, 2015, 18:41 |
|
#5 |
Member
methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 40
Rep Power: 11 |
Thank you very much Fabian I did it.
Last edited by meth; November 5, 2015 at 01:03. |
|
November 5, 2015, 22:58 |
|
#6 |
Member
methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 40
Rep Power: 11 |
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 |
|
December 11, 2015, 05:45 |
|
#7 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
Sorry for the late response. I guess you are right. The table is not run-time-modifiable.
Cheers Fabian |
|
February 26, 2022, 05:44 |
|
#8 |
New Member
Feng
Join Date: Aug 2021
Posts: 8
Rep Power: 5 |
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 |
|
March 15, 2022, 23:40 |
|
#9 |
New Member
Join Date: Mar 2022
Posts: 2
Rep Power: 0 |
Thank you for sharing, they are very helpful for me
|
|
March 16, 2022, 01:01 |
|
#10 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
@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) |
|
March 17, 2022, 08:48 |
|
#11 | |
New Member
Feng
Join Date: Aug 2021
Posts: 8
Rep Power: 5 |
Quote:
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 |
||
May 25, 2023, 03:03 |
|
#12 | |
New Member
Join Date: May 2023
Posts: 1
Rep Power: 0 |
Quote:
|
||
|
|
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 08:30 |
How to export time series of variables for one point? | mary mor | OpenFOAM Post-Processing | 8 | July 19, 2017 11:54 |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 12:08 |
Setting boundary condition to follow a time series signal | odellar | OpenFOAM Pre-Processing | 1 | March 2, 2015 11:04 |
[swak4Foam] Air Conditioned room groovyBC | Sebaj | OpenFOAM Community Contributions | 7 | October 31, 2012 15:16 |