<div dir="ltr">Hello again, <br><br><div>I want to provide more information, and more detail of my exact case to hopefully make it easier to get assistance.</div><div><br></div><div>Using the 2D blasius example as a base, I have created a mesh file "box.box" that allow me to modify the domain.</div>

<div>After renaming the necessary files (program is now called 'box') this works fine with the an unmodified blasius.usr (now 'box.usr') code.</div><div><br></div><div>The next step I took was to change the boundary conditions in <font face="courier new, monospace">userbc() [</font><font face="verdana, sans-serif">and</font><font face="courier new, monospace"> useric()] </font><font face="verdana, sans-serif">in box.usr</font>.</div>

<div>As I understand, the nodes on the inlet plane are called sequentially from bottom to top, by element number ('<font face="courier new, monospace">e</font>') and then by node number ('<font face="courier new, monospace">iy</font>').</div>

<div>The elements are not numbered sequentially from bottom to top, but rather left-to-right, then back to the start, then up, then left-to-right again.</div><div>Therefore for a domain of 410 elements in the streamwise (x) direction, the element numbers along the inlet are, from bottom to top: 1, 411, 821, etc. </div>

<div>There are 12 elements in the wall normal (y) direction.</div><div><br></div><div>I have an array ('<font face="courier new, monospace">ArrangedInlet</font>') in the subroutine containing the horizontal velocity component, ux, value for each of the nodes along the inlet according to their y coordinate  The original data lives in the file called 'InletArranged.out'. This is output by a process in MATLAB so there is freedom in what is included and how it is arranged and formatted.</div>

<div>The data points are currently entered manually. This is initially to test, but it is intended that this is read automatically from the external file.</div><div>However in order to assign the correct velocity value to the correct position along the inlet, I arranged the data in the array such that the rows counted iy from 1 to 8 (<font face="courier new, monospace">lx1</font>) and each is addressing a node: Row 1=Node 1; Row 2 = Node 2, etc. where the nodes go bottom-to-top (y=0 to y=10), </div>

<div>The columns contained the data for each element along the inlet - ordered from bottom to top. At the moment each row . </div><div><br></div><div>Using the same domain as described above (NELX, NELY)=(410, 12):</div>
<div>
column 1 contains data at each node ('<font face="courier new, monospace">iy</font>') for element 1,</div><div>column 2 contains data at each node ('<font face="courier new, monospace">iy</font>') for element 411, </div>

<div>column 3 contains data at each node ('<font face="courier new, monospace">iy</font>') for element 821, </div><div>and so on. </div><div><br></div><div>I got around this by using the following transformation:</div>

<div><font face="courier new, monospace">COL=((e-1)/NELX)+1</font></div><div>where:</div><div><font face="courier new, monospace">COL</font> is the column number of the array (1 to 12); </div><div><font face="courier new, monospace">e  = gllel(eg)</font> is the element number;<br>

</div><div><font face="courier new, monospace">NELX = 410</font> is the number of elements in the streamwise (x) direction.<br></div><div><br></div><div>This is then read by the program by:</div><div><font face="courier new, monospace">ux = ArrangedInlet(iy,COL)</font><br>

</div><div><br></div><div>And it works! ... but only for a serial case. Also, it currently only works for the single set of data.</div><div><br></div><div>As soon as I run the case in parallel the addressing changes and this method does not work.</div>

<div>The element addressing no longer appears to have a discernible pattern.</div><div><br></div><div><b>So my questions are primarily:</b></div><div><b>1) How can I get the values onto the inlet and make it work in parallel? </b>and<br>

</div><div><b>2) Is there a more elegant/efficient method of doing this? IE. a way of calling the inlet nodes only?</b></div><div><br></div><div>I have attached my case "box_2D_Inlet.tar.gz". </div>
<div>I have tested it and it does work, however currently it bombs out after 9 iterations, but I'm really only testing the inlet parameters.</div><div><br></div><div>Looking forward to any assistance.</div><div><br></div>

<div>Thanks, </div><div><br></div><div>Tom.</div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 17 July 2014 10:37, Thomas Yankos <span dir="ltr"><<a href="mailto:s3286374@student.rmit.edu.au" target="_blank">s3286374@student.rmit.edu.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All, <div><br></div><div>I'm using NEK5000 for a university project. I've found it to be blissfully fast and relatively easy to use.</div>
<div><br></div><div>The problem I'm doing is a blasius boundary layer case with perturbations (simulating Tollmien–Schlichting waves), initially in 2D as per the blasius example, then eventually moving to 3D.</div>
<div>I've so far been successful in running the blasius example case, and modifying the mesh, polynomial order and other input parameters.</div><div><br></div><div>Now however, I want to change the way the boundary conditions are defined.</div>

<div>I have input files that are unique for each time step specifying velocity and pressures along a line (the inlet) in text format. It would be possible to re-format these as .csv or another file if necessary.</div><div>

<br></div><div><b>How can I get NEK to read these files as boundary conditions on the inlet for each time step?</b><br></div><div><br></div><div>I understand it will be a specification in the user userbc subroutine in blasius.usr however I'm not sure how to actually implement this.</div>

<div>Doing it in 2D will be a precursor to a 3D simulation with the file specifying the inlet <i>plane </i>in a text file, rather than just a <i>line</i>. </div><div><br></div><div>Looking forward to a response.</div><div>

<br></div><div>Warm Regards,</div><div>Tom.</div></div>
</blockquote></div><br></div></div>