|
[Sponsors] |
boundary condition for coupled inlet and outlet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 20, 2013, 13:47 |
boundary condition for coupled inlet and outlet
|
#1 |
Member
xxxxx
Join Date: Feb 2013
Posts: 34
Rep Power: 13 |
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 |
|
August 13, 2013, 06:12 |
May be a shell script is helpful
|
#2 |
New Member
Aditya
Join Date: May 2013
Location: Munich Germany
Posts: 29
Rep Power: 13 |
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. |
|
August 13, 2013, 16:51 |
|
#3 |
Member
xxxxx
Join Date: Feb 2013
Posts: 34
Rep Power: 13 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 16: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 |