CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem in using fixedProfile boundary condition for unstructured grid

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 7, 2022, 05:32
Default Problem in using fixedProfile boundary condition for unstructured grid
  #1
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Hello all,

I am trying to simulate a turbulent pipe flow and found that the length of the pipe is not adequate for the fully developed flow, thus wanted to use the outlet slice of this domain to act as the inlet for my simulations to save my simulation time (also, I guess this could be assumed to be a periodic pipe case simulation). I found some helpful links from the CFD Online community and was trying to use the fixedProfile type as my inlet boundary condition. But when I slice the domain close to outlet, I get a csv file as a function of x and y (assuming the streamwise flow direction in Z). The inlet BC looks like:
Code:
inlet
    {
       // type            fixedValue;
      //  value           uniform ( 0 0 18.8 );
      
        type            fixedProfile;
        profile         csvFile;
        profileCoeffs
        {
            nHeaderLine         1;          // number of header lines
            refColumn           0;          // reference column index
            componentColumns    (1 2 3);    // component column indices
            separator           ",";        // optional (defaults to ",")
            mergeSeparators     0;         // merge multiple separators
            file            "uvelocity_z0.024.csv";  // name of csv data file
            outOfBounds         clamp;      // optional out-of-bounds handling
            interpolationScheme linear;     // optional interpolation scheme
        }
        direction        (1 1 0);
        origin         0;
         }
And my data at the slice looks like the attached image. As you could easily see that the date is written (using paraview) in an unstructured way. I am not sure if this kind of input is admissible for this boundary condition. Consequently I am getting the error which says:
Code:
--> FOAM FATAL ERROR: 
out-of-order value: 0.00070197 at index 1

    From function void Foam::Function1Types::TableBase<Type>::check() const [with Type = Foam::Vector<double>]
    in file lnInclude/TableBase.C at line 129.

 FOAM exiting
Could anyone please help in this regard, any comment/suggestion are most welcomed, thanks in advance.
Attached Images
File Type: png screenshot_table.png (46.0 KB, 26 views)

Last edited by chandra shekhar pant; February 7, 2022 at 05:33. Reason: Missplet subject line
chandra shekhar pant is offline   Reply With Quote

Old   February 22, 2022, 04:58
Default
  #2
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
After a bit of struggle I found a way to work, maybe useful to someone:
1. Using the paraview: take the slice in xy plane (Z normal in paraview) at close to exit (I took at z=0.024, the domain in z is 0.025 ) assuming the flow in z direction.
2. Save the data as: File -> Save Data. While saving the data, inside the Field Association - select Cell Data instead of Point Data (which is default). This is because while importing the data into the OpenFOAM it requires the Cell Data instead of Point Data. This is the only important point that has to be taken into consideration.
3. Now the boundary condition used for different parameters are:

Code:
       type fixedValue;
        value nonuniform List<vector>
        (
        );
for vector quantity and for scalar it is:
Code:
       type fixedValue;
        value nonuniform List<scalar>
        (
       );
4. Since the format used for vector has to be (u v w) thus I used the
Code:
 awk
command.
5. Specifically used
Code:
awk '{print "("$0}' u.dat > u1.dat
for adding "(" then used awk
Code:
'{print $0")"}' u1.dat > u2.dat
for adding ")"
6. After the file is ready copy the entries of the file u2.dat inside the boundary condition for U :
Code:
value nonuniform List<vector>
        (
 (0.2 0.2 0.4)
(0.6 0.8 0.1)
......
...
        );
chandra shekhar pant is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
On grid independent solution for pulsatile flow David FLUENT 5 March 25, 2022 03:33
cgns grid problem praveen SU2 20 March 10, 2014 14:09
Grid Independence problem immortality OpenFOAM Running, Solving & CFD 6 May 28, 2013 18:12
Re: Convergence problem for refined grid CFD_Novice Main CFD Forum 13 February 17, 2008 22:56
nonstaggered grid problem Zhi-Xing Yu Main CFD Forum 7 August 26, 1998 13:22


All times are GMT -4. The time now is 21:59.