|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Join Date: Dec 2012
Posts: 3
Rep Power: 2 ![]() |
Hello everybody,
to get time and space dependent inlet boundary conditions I'm using TimeVaryingMappedFixedValue. Unfortunately I get kind of weird distribution of the velocity at the inlet patch. I create point map and velocity map via octave. To show you the problem I've made two examples. In both cases I prospect a cube with a equidistant mesh of 35x35x35. For the inlet patch I create 35 x 35 equidistant velocity values such that in each cell center the velocity is given. (And actually no interpolation is needed) 1. The velocity is a step function: 2 m/s within 7 cells next to the wall; 10 m/s in the middle. octave output: https://dl.dropbox.com/u/48415338/pr...tep_octave.png velocity distribution after solving at the inlet patch: https://dl.dropbox.com/u/48415338/pr...p_paraView.png 2. In this example there is no problem (velocity = x + y) octave output: https://dl.dropbox.com/u/48415338/no_problem_octave.png velocity distribution after solving at the inlet patch: https://dl.dropbox.com/u/48415338/no...m_paraView.png So in cases of huge velocity gradient such as in ex. 1 I always get this kind of stripes. (I also have done some additional examples) Maybe I have to change some settings in the U file where I call TimeVaryingMappedFixedValue?! type timeVaryingMappedFixedValue; setAverage off; I would be grateful for any idea what's going on here. Thank you very much! Best regards Heiko |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Join Date: Dec 2012
Posts: 3
Rep Power: 2 ![]() |
In order to make my problem more obvious I have created a short example:
I treat a cube with 4x4x4 meter and uniform cell dimensions 1x1 meter. Now I want to show you the relevant files for the TimeVaryingMappedFixedValue. If there are more files which are addressed by TimeVaryingMappedFixedValue please let me know. The inlet patch is placed at x=0 such that the inlet is y=0 to y=4 and z=0 und z=4 with stream direction in +x. points file in boundaryData/inlet: (the points are placed at the center of the inlet patch cells) Code:
FoamFile
{
version 2.0;
format ascii;
class vectorField;
object points;
}
(
//z = 0.500000:
(0 0.500000 0.500000)
(0 1.500000 0.500000)
(0 2.500000 0.500000)
(0 3.500000 0.500000)
//z = 1.500000:
(0 0.500000 1.500000)
(0 1.500000 1.500000)
(0 2.500000 1.500000)
(0 3.500000 1.500000)
//z = 2.500000:
(0 0.500000 2.500000)
(0 1.500000 2.500000)
(0 2.500000 2.500000)
(0 3.500000 2.500000)
//z = 3.500000:
(0 0.500000 3.500000)
(0 1.500000 3.500000)
(0 2.500000 3.500000)
(0 3.500000 3.500000)
)
Code:
FoamFile
{
version 2.0;
format ascii;
class vectorAverageField;
object values;
}
(0 0 0)
16
(
//z = 0.500000:
(2.000000 0 0)
(2.000000 0 0)
(2.000000 0 0)
(2.000000 0 0)
//z = 1.500000:
(4.000000 0 0)
(4.000000 0 0)
(4.000000 0 0)
(4.000000 0 0)
//z = 2.500000:
(4.000000 0 0)
(4.000000 0 0)
(4.000000 0 0)
(4.000000 0 0)
//z = 3.500000:
(2.000000 0 0)
(2.000000 0 0)
(2.000000 0 0)
(2.000000 0 0)
)
In the 0 boundary directory in the main folder of the case, I call the TimeVaryingMappedFixedValue by: Code:
inlet
{
type timeVaryingMappedFixedValue;
setAverage off;
}
Finally the results for the inlet at time 1 after solving the case with simpleFoam: Code:
boundaryField
{
inlet
{
type timeVaryingMappedFixedValue;
setAverage 0;
peturb 1e-05;
value nonuniform List<vector>
16
(
(2 0 0)
(2 0 0)
(2.00005 0 0)
(2 0 0)
(3.99998 0 0)
(4 0 0)
(4 0 0)
(4 0 0)
(3.00001 0 0)
(4 0 0)
(3.99997 0 0)
(3.73515 0 0)
(2 0 0)
(2 0 0)
(2.00001 0 0)
(2 0 0)
);
I'm still hoping that I made a stupid mistake. So if you have any idea what's wrong please let me know. The hole test case is also attached to this post. BIG THX |
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Julien
Join Date: Jun 2012
Location: France
Posts: 139
Rep Power: 2 ![]() |
Hi Heiko,
Did you solve out your problem? I am not an expert, but I successfully used timeVaryingMappedFixedValue , so maybe I can bring some help... First of all, it seems that this boundary condition is very powerful since it can interpolate in time and space: thus, you do not need to take care about the space grid and time steps. Foam will interpolate (I suppose by linear interpolation ?) from the given data to the needed points and time steps. You just need to check that your data "cover" the needed points : the first boundary data must be before (or equal) first calculation time step, and the boundary data map larger (or equal) to the patch with boundary condition 'timeVaryingMappedFixedValue '. I don't see any "mistake" in your files, but I have some suggestions:
Code:
% - turbInletFields % | - scalarField % | | k % | | p % | | nuSgs % | - Vectorfield % | | U % | faceCenters % | faces % | points I think all these advices won't help you, Heiko, sorry. But maybe somebody else (Timo from Stuttgart ?) will find here some interesting information... Sincerely, Djub |
|
|
|
|
|
![]() |
| Tags |
| confusing, inlet, interplation, mappedfixedvalue, timevarying |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Interpolation Error on FAM Mesh with Cyclic BCs | ngj | OpenFOAM Bugs | 1 | August 9, 2011 06:12 |
| urgent help needed (rhie-chow interpolation problem) | Ardalan | Main CFD Forum | 2 | March 18, 2011 16:22 |
| Help on 2D interpolation in StarCCM+ | madhuri | CD-adapco | 0 | November 3, 2010 15:21 |
| Surface interpolation schemes and parallelization | jutta | OpenFOAM Running, Solving & CFD | 0 | February 25, 2010 14:32 |
| momentum interpolation for collocated grid | Hadian | Main CFD Forum | 4 | December 25, 2009 07:25 |