setting the correct format of nonuniform List<vector> for inlet in 0 Folder
I have some problem with the correct format of nonuniform List<vector> for my inlet boundary conditions for U in 0 Folder.
I want to specify a nonuniform velocity for U at inlet for my LES calculation from my previous RANS calculations output.
In nonuniform List<vector> we must specify only the U in the inlet faces like this:
so here is my question:
how can I export my inlet from my previous RANS calculations at the inlet patch to have the above format (i.e. the values of velocities at inlet faces with the OpenFOAM Format) without the need for arranging them manually. since my inlet have more than 4000 faces so it is impossible to do it manually.:confused::confused::confused:
I have used the sampling utility in inlet for my previous calculations but it gave me the values of velocities at points not cells.
Does anybody know how can i do that?
Thanks for your helps in advance.
I found The Answer.
I write it here for the future use.
The values for all the variables will be written for all the patches (including the inlet patch) in all timesteps (except 0 folders) in the same format that is needed for "nonuniform List<vector>" so I can easily copy them for 0 Folder.
so there is no need for sampling utility.
furthermore I found the answer to my question about sampling by reading the sampleDict headers in src.
in order to sample the data on a surface the following code should be added to controlDict:
Of course as I told before there is a simpler way and therefore no need to use the sampling utility in order to find the corresponding values that must be used with "nonuniform List<vector>"
but the final results for both was the same.
hi, thanks for sharing your results.
I tried to apply the sample utility to the channel flow case, creating a sampleDict where I define a plane at a certain distance from the outlet:
basePoint (3 0 0);
normalVector (1 0 0);
I run the solver, then I type:
and a directory called surfaces is created, where you can find:
a file called faceCentres which has twice the number of cells (if I have a square grid of 4x4 cells, faceCentres has 32 values);
a file called points where there's the list of the grid points coordinates (25 values if you have a 4x4 grid);
files p and U containing twice the number of cells (32).
What I think I have understood is that by the sample utility (and by the above sampleDict) I obtain values of p and U (and others if you want) at cell centres, not at points.
I am trying to use this "sampled" files to feed another channel flow case at inlet by timeVartingMappedFixedValue, such as in pitzDailyExptInlet tutorial).
The questions are:
how do you manage to get a list of values for p, U, .... fields at a certain section (at inlet, outlet, or middle sections) without sampling utility?
don't you need something like timeVaryingMappedFixedValue or groovyBC boundary patch type to set nonUniform list of values at inlet?
in this case i use a trick so that i will use timeVaryingMappedFixedValue or groovyBC type for my inlet then i will run my case only for 1 time step then I go to the new time step folder and continue just like that i said above.
The reason for this is that because if I use timeVaryingMappedFixedValue or groovyBC for my inlet since they are a type not value then I can't use other inlet types like directMapped (at least I don't know how to use them simultaniously!!:confused::confused:)
But what, if the outlet of the source case does not have the same mesh as the inlet of the target case, i.e. meshes are not conformal? I can not just copy the "old" values to the "new" inlet, because number and location of each face differs...
Yeah you are right.I dont know what to do if you want to use the outlet of you case for the inlet of your new case.
Please let me know if you find something.
I have found that most of the LES tutorials in OF set the inlet velocity as
|All times are GMT -4. The time now is 06:09.|