CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Regarding initialization of LES Channel395 (https://www.cfd-online.com/Forums/main/231846-regarding-initialization-les-channel395.html)

ari003 November 20, 2020 07:15

Regarding initialization of LES Channel395
 
Hello Foamers,
I was trying to run the LES channel395 with Ubar=10.5 instead of 0.1355 which was the default. Whenever I do so I'm getting very unexpected result and its obvious because I kept the 0 folder unchanged where the U field had non-uniform list initialization with velocities around 0.1335.

Quote:

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)
..........
.......
I can remove the initialization but it will take a long time to get a developed flow, so in this regard I'm trying to initialize the field with velocity around 10.5( Ubar=10.5) instead of 0.1335. If anyone is having any idea on this it will be my pleasure if you share so.

LuckyTran November 20, 2020 08:14

Just open the U file and change internalField uniform (0.1335 0 0); to internalField uniform (10.5 0 0);

Yes you have to run it for a long time, but you have to do for any velocity.


The tutorial starts with a uniform field of 0.1335 unless you have taken a case already run from someone else.

ari003 November 20, 2020 09:47

Quote:

Originally Posted by LuckyTran (Post 788345)
Just open the U file and change internalField uniform (0.1335 0 0); to internalField uniform (10.5 0 0);

Yes you have to run it for a long time, but you have to do for any velocity.


The tutorial starts with a uniform field of 0.1335 unless you have taken a case already run from someone else.

Thanks for your response but I have internal field as non-uniform list of 60000 cells. I'm looking to change this non-uniform list.
Quote:

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)
..........
.......

FMDenaro November 20, 2020 11:05

As my general understanding, you are simulating a plane channel flow and you have periodic condition in streamwise direction driven by a forcing term, right? No matter how you initialize the velocity field, the mass flow rate is determined by the forcing term. You can start from any intial condition as you have to run the solution until the initial condition is totally disregarded.

In your case you can simply use the initial list using a multiplier of the entries C= 10.5/0.1355.


But if the forcing term is not changed accordingly, I am quite sure that the solution is the same of the tutorial. Check that.

ari003 November 20, 2020 11:34

Quote:

As my general understanding, you are simulating a plane channel flow and you have periodic condition in streamwise direction driven by a forcing term, right?
Absolutely right.
Quote:

No matter how you initialize the velocity field, the mass flow rate is determined by the forcing term. You can start from any intial condition as you have to run the solution until the initial condition is totally disregarded.

In your case you can simply use the initial list using a multiplier of the entries C= 10.5/0.1355.


But if the forcing term is not changed accordingly, I am quite sure that the solution is the same of the tutorial. Check that.
Actually my aim behind doing this is just to set the mean velocity of the flow at 10.5m/s and I found that we can do that by changing the body force i.e Ubar. But by simply doing so there will be some discrepancy with the initialized field(which I stated before). So henceforth I'm trying to set the non uniform initial field in such a way(Ubar=10.5) that the trend matches with the normal tutorial case(Ubar=0.1335 default). Your suggestion is to use a multiplier to scale up but how to do that automatically? Otherwise it will be really tedious for 60000 cells.

Quote:

You can start from any intial condition as you have to run the solution until the initial condition is totally disregarded.
If you don't mind can you please let me know what s the reason behind this?

FMDenaro November 20, 2020 12:01

Quote:

Originally Posted by ari003 (Post 788373)
Absolutely right.


Actually my aim behind doing this is just to set the mean velocity of the flow at 10.5m/s and I found that we can do that by changing the body force i.e Ubar. But by simply doing so there will be some discrepancy with the initialized field(which I stated before). So henceforth I'm trying to set the non uniform initial field in such a way(Ubar=10.5) that the trend matches with the normal tutorial case(Ubar=0.1335 default). Your suggestion is to use a multiplier to scale up but how to do that automatically? Otherwise it will be really tedious for 60000 cells.



If you don't mind can you please let me know what s the reason behind this?




The reason is the the transient starting from the prescribed initial condition is only numerics, has no physical correlation. Therefore, you need to wait enough time until the flow is in statistically energy equilibrium. Only after that the velocity field is physically correlated and can be sampled.

sbaffini November 20, 2020 12:21

The confusion comes from an unmentioned, important, fact: he is using OpenFOAM.

So, for Filippo: OF settings for this case are based on fixed mass flow rate (i.e. average velocity) instead of pressure gradient.

For Arijit: come on, don't be so Fluent user. This is the main forum so, you either, at least, mention what you are using (I don't even want to get into the general utility of the discussion) or go to the OF forums (there are, literally, tens here).

ari003 November 20, 2020 12:26

Quote:

Originally Posted by FMDenaro (Post 788376)
The reason is the the transient starting from the prescribed initial condition is only numerics, has no physical correlation. Therefore, you need to wait enough time until the flow is in statistically energy equilibrium. Only after that the velocity field is physically correlated and can be sampled.

So you are saying if I m sampling the data (Ubar=10.5 and initail field= unchanged)at any plane of the channel then I 've to wait enough time so that there remain no influence of the initial field. Right?

If this is so then isn't it simply better to specify uniform field(10.5,0,0) because in anyway we have to wait until the flow becomes develop?

Note:- According to my understanding we used initial non-uniform field in the tutorial channel so that the flow is in developed stage from 0th sec.

ari003 November 20, 2020 12:44

Quote:

Originally Posted by sbaffini (Post 788379)
The confusion comes from an unmentioned, important, fact: he is using OpenFOAM.

So, for Filippo: OF settings for this case are based on fixed mass flow rate (i.e. average velocity) instead of pressure gradient.

For Arijit: come on, don't be so Fluent user. This is the main forum so, you either, at least, mention what you are using (I don't even want to get into the general utility of the discussion) or go to the OF forums (there are, literally, tens here).

Thank you for your kind reminder. I think Filippo understood quite well before that it is an OpenFoam issue .
Quote:

But if the forcing term is not changed accordingly, I am quite sure that the solution is the same of the tutorial. Check that.

FMDenaro November 20, 2020 12:54

Paolo, I remember you can set in OF both mass flow and pressure forcing, isn't that?

At least in the version I worked on with Franco and Andrea during LESinItaly benchmark. In that case the full set of equations implied also a forcing in the energy equation, maybe this is not the set of equations adopted in the tutorial...
However, even using the mass flow rate, the forcing is determined dinamically and does not depend on the initial velocity field, isn't it??

FMDenaro November 20, 2020 12:56

Quote:

Originally Posted by ari003 (Post 788380)
So you are saying if I m sampling the data (Ubar=10.5 and initail field= unchanged)at any plane of the channel then I 've to wait enough time so that there remain no influence of the initial field. Right?

If this is so then isn't it simply better to specify uniform field(10.5,0,0) because in anyway we have to wait until the flow becomes develop?

Note:- According to my understanding we used initial non-uniform field in the tutorial channel so that the flow is in developed stage from 0th sec.




You can set a uniform field but this way the onset of the departure from the Poiseulle solution is due to the perturbation introduced by the numerical errors. That can produce a very long transient but also a false convergence to a steady laminar solution if the method produced too artificial dissipation.

sbaffini November 20, 2020 13:02

I guess the issue here is just how to multiply a given initial field in OF, one given cell by cell and not as uniform initial field, by the constant 10.5/0.1355. So it should not regard the forcing or LES at all, that's why I wrote my previous post.

My suggestion, write a small OF program that just reads it, makes the multiplication and saves it again. It is a one shot need that you have and the whole point of using OF is that you can do this stuff easily.

ari003 November 20, 2020 13:09

Quote:

Originally Posted by FMDenaro (Post 788386)
You can set a uniform field but this way the onset of the departure from the Poiseulle solution is due to the perturbation introduced by the numerical errors. That can produce a very long transient but also a false convergence to a steady laminar solution if the method produced too artificial dissipation.

So in this regard what do you think will be the best way to tackle the issue of initialization and setting the mean velocity to 10.5 m/s?

Keeping in mind we cant use uniform field as it will lead to immense dissipation error and long transient time.

If the solution to all these problems is just scale up the initial field then Python will be a good choice isnt it?

FMDenaro November 20, 2020 13:28

Quote:

Originally Posted by ari003 (Post 788389)
So in this regard what do you think will be the best way to tackle the issue of initialization and setting the mean velocity to 10.5 m/s?

Keeping in mind we cant use uniform field as it will lead to immense dissipation error and long transient time.

If the solution to all these problems is just scale up the initial field then Python will be a good choice isnt it?




Paolo suggested the way previously. Just read and scale each value of the list.


All times are GMT -4. The time now is 12:47.