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

boundary condition for coupled inlet and outlet

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 20, 2013, 12:47
Default boundary condition for coupled inlet and outlet
  #1
Member
 
xxxxx
Join Date: Feb 2013
Posts: 34
Rep Power: 4
xxxx is on a distinguished road
Hello everybody.

I need to run a case in whitch inlet and outlet are strictly linked. I mean that I need to impose Uz velocity component on inlet ( = flux through inlet), calculate the internal velocity field and then impose Ux and Uy veolcity at inlet equal to the ones calculated for outlet, while keeping the same Uz velocity component on inlet.
It seems to me that the problem is closed and correctly defined ( = no circular definition of BCs), since for time zero I impose U = (0 0 Uz) at inlet and for each following time step I impose U = (Ux (outlet,former time step) Uy (outlet, former time step) Uz ).
I have to use a structured mesh and for each inlet node there's a corresponding node at outlet, so I should not have problems of interpolation.
Is there anyone who knows if there is an already implemented BC for my case?
If not, is there anyone who knows how to write a new BC and can give me some advice? I quite know C++ code but I don't have any idea of how BC have to be implemented in OF.

Thank in advance.
__________________
Federico
xxxx is offline   Reply With Quote

Old   August 13, 2013, 05:12
Default May be a shell script is helpful
  #2
New Member
 
Aditya
Join Date: May 2013
Location: Munich Germany
Posts: 27
Rep Power: 4
kingmaker is on a distinguished road
Hello
I am no expert in OpenFoam but here is what came to my mind.
I do not know if it is possible using some functions in Openfoam. But what comes to my mind is that you can use a shell script to write the values of Ux and Uy in to the U file in latest time step and then restart the simulation using "latestTime" flag in controlDict.
So finally the work flow will be like that.

1. start simulation with initial condition.
2. run it one step
3. update the velocities at inlet (from previous time step) using shell script (with programs like awk and sed)
(here you may also have to update the controlDict to make simulation run only for one more time step)
4. restart the simulation with flag "latestTime" in control dict.

This is a very dirty hack ... I know ..
.... hope that will be of some help.
kingmaker is offline   Reply With Quote

Old   August 13, 2013, 15:51
Default
  #3
Member
 
xxxxx
Join Date: Feb 2013
Posts: 34
Rep Power: 4
xxxx is on a distinguished road
Hello kingmaker,

thanks for your answer..
Actually what you say is what I have already tried, without success.
I used foamCalc components U -latestTime to exctract Ux, Uy, Uz components.
Then I have written a java program which reads from Ux, Uy, Uz files and copies values from outlet to inlet patch.
The problem is that, although I'm using a structured grid, the points ordering is not the same on the to patches. So, if I simply copy the values from a patch to another I don't get what I want.
I should know the exact points order on the to patches or I should read each point coordinates on a patch and found the coupled point on the other one...It is a long and hard work!...so I decided to use a simpler, 'though much expensive, method: I created another domain by copying the original mesh and I stiffly mooved it to match the outlet of "volume 1" (original geometry) to the inlet of "vol 2".
So I simply use the first volume just to create the inlet condition for the second one, whitch is what I really need...of course the mesh size becomes twice the original one!
This may work 'til the mesh is "light" (some hundred of elements) but is not viable for "heavier" meshes..

thanks any way
__________________
Federico
xxxx is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 34 October 16, 2014 05:27
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 04:23.