|
[Sponsors] |
How to define in inlet boundary condition a time-varying and non-uniform condition |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 2, 2017, 16:48 |
How to define in inlet boundary condition a time-varying and non-uniform condition
|
#1 |
New Member
Ahmed Elshaer
Join Date: May 2014
Posts: 6
Rep Power: 12 |
Hi,
I am trying to set an inlet boundary condition for a simulation similar to wind tunnel testing. The inlet boundary condition for the velocity should be a table or list (that I have already generated using some numerical models) The table has the velocities as a matrix that has a number of rows equal to the inlet cells or faces, and a number of columns equals to the number of time steps for the LES simulation. I will be using the pisoFoam model and I wonder what type of boundary condition to map these list that varies with location and time step. I tried to use nonuniform List<vector>, but it only varies with location and doesn't vary with time Also, the timevaryingmappedfixedvalue varies with time and doesn't vary with location Can anyone help me with this please? |
|
June 3, 2017, 02:08 |
|
#2 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
> and doesn't vary with time
There may be more advanced techniques, but there is also an easy way: Stop the simulation after each time step, use a script to change the b.c. and start the next time step.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
June 3, 2017, 23:35 |
|
#3 | |
New Member
Ahmed Elshaer
Join Date: May 2014
Posts: 6
Rep Power: 12 |
Quote:
Thank you very much piu58, Can you give me a quick guidance on how to to change the b.c each time step ??? Thanks again |
||
June 4, 2017, 01:01 |
|
#4 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
I don't konw in which form your b.c. exists. The easiest way is to prepare pattern files for all the b.c. objects in your 0 directory in the form
Code:
internalField nonuniform List<scalar> 32336 ( #0 #1 #2 : ) Code:
's/#0/myBoundaryCondition_0/' 's/#1/myBoundaryCondition_1/' :
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
June 5, 2017, 12:48 |
|
#5 | |
New Member
Ahmed Elshaer
Join Date: May 2014
Posts: 6
Rep Power: 12 |
Quote:
Your help is so much appreciated !! |
||
June 5, 2017, 13:43 |
|
#6 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
The solver read what it is in the <timestep> directory. At the beginning this is the 0 folder. You have to manipulate / replace the files in the directory of the last timestep.
Of course you have to set the startFrom entry in the controlDict file to latestTime.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
June 5, 2017, 13:45 |
|
#7 |
New Member
Ahmed Elshaer
Join Date: May 2014
Posts: 6
Rep Power: 12 |
That is a great idea!! thanks a lot. you are a lifesaver
|
|
June 5, 2017, 13:48 |
|
#8 |
New Member
Ahmed Elshaer
Join Date: May 2014
Posts: 6
Rep Power: 12 |
just a last (hopefully) question to make this replacement for each time step. where should I do a script for that? is it at the controlDict derctory?
|
|
June 5, 2017, 16:10 |
|
#9 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
You need to let the simulation run by a shell script in the form
loop: - prepare the b.c. with sed - start pimpleFoam or what solver you want to have (needs to stop after one time step) endloop
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
June 5, 2017, 16:18 |
|
#10 |
New Member
Ahmed Elshaer
Join Date: May 2014
Posts: 6
Rep Power: 12 |
||
|
|