CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   ChannelFoam (channel395) tutorial (https://www.cfd-online.com/Forums/openfoam-solving/122946-channelfoam-channel395-tutorial.html)

chaitanya2905 September 1, 2013 09:19

ChannelFoam (channel395) tutorial
 
Hi all,
While running the channel395 LES case in OpenFOAM, I came across the input files for U, P in the 0/ folder.

In an earlier version of OpenFOAM the following was given as U -
dimensions [ 0 1 -1 0 0 0 0 ];

internalField uniform ( 0.1335 0 0 );

boundaryField
{
bottomWall
{
type fixedValue;
value uniform ( 0 0 0 );
}
topWall
{
type fixedValue;
value uniform ( 0 0 0 );
}
sides1_half0
{
type cyclic;
}
sides2_half0
{
type cyclic;
}
inout1_half0
{
type cyclic;
}
inout2_half0
{
type cyclic;
}
sides2_half1
{
type cyclic;
}
sides1_half1
{
type cyclic;
}
inout1_half1
{
type cyclic;
}
inout2_half1
{
type cyclic;
}
}

But in a more recent version, some particlular values are given as input as follows-
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: splitCyclic |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [ 0 1 -1 0 0 0 0 ];

internalField nonuniform List<vector>
60000
(
(0.0107927 -2.64614e-05 0.00214946)
(0.0107939 -3.50395e-05 0.0018715)
(0.010668 -2.59457e-05 0.0018284)
(0.010506 -2.30178e-05 0.00187392)
(0.0102247 -2.2066e-05 0.00177587)
(0.00955156 -1.34048e-05 0.0014899)
---
--- (total 60000 values)
---
---
(0.00350409 2.92775e-06 0.000598645)
(0.00363976 8.34116e-06 0.000584211)
(0.00387081 1.03007e-05 0.00028651)
(0.00405982 9.84038e-06 -0.000195238)
(0.00422723 9.75437e-06 -0.000496873)
)
;

boundaryField
{
bottomWall
{
type fixedValue;
value uniform ( 0 0 0 );
}
topWall
{
type fixedValue;
value uniform ( 0 0 0 );
}
sides1_half0
{
type cyclic;
}
sides2_half0
{
type cyclic;
}
inout1_half0
{
type cyclic;
}
inout2_half0
{
type cyclic;
}
sides2_half1
{
type cyclic;
}
sides1_half1
{
type cyclic;
}
inout1_half1
{
type cyclic;
}
inout2_half1
{
type cyclic;
}
}

Can anyone please explain how these values were derived ?

It is very important for me as I want to alter the dimensions of the channel and hence would require to give new velocity values in 0/ folder.

sadsid January 8, 2021 01:56

facing the same issue. Have you resolved it? Please let me know.

Tobermory January 8, 2021 09:00

It looks like the tutorial case was updated at some point with a set of initial fields from an earlier run. These were then copied in as t=0 fields.

There is no easy shortcut to get these - the simplest is to just run a "spin-up" simulation, starting with a perturbed laminar field. You could try play around with artifical turbulence to seed an initial turbulent field, but in the end you will still have to run the code for it to settle down and become real turbulence, so you may not actually save much time.

sadsid January 8, 2021 12:25

Quote:

Originally Posted by Tobermory (Post 792815)
It looks like the tutorial case was updated at some point with a set of initial fields from an earlier run. These were then copied in as t=0 fields.

There is no easy shortcut to get these - the simplest is to just run a "spin-up" simulation, starting with a perturbed laminar field. You could try play around with artifical turbulence to seed an initial turbulent field, but in the end you will still have to run the code for it to settle down and become real turbulence, so you may not actually save much time.


Yes, I guess the same and tried to get the initial conditions using perturbU. I am not getting results close to the benchmark solutions. I thought maybe there is some correlations that are used to generate these non-uniform internal fields.


All times are GMT -4. The time now is 10:44.