CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   Custom initial conditions (https://www.cfd-online.com/Forums/star-ccm/132556-custom-initial-conditions.html)

mikehi58 April 2, 2014 14:41

Custom initial conditions
 
Hi,

I'm not new to star-ccm+ but am new to the more advance features. I have a very specific question so I thought I might as well ask in my own post as opposed to piecing together bits from across the forum.

For my masters project I'm making a very rapid boundary layer prediction algorithm (2-D), so far its going well and its accurate. Eventually I want to use it with star. This would take form of a text file with coordinates and a velocities that I would use for the initial velocity field, as opposed to the uniform field that is the default in star.

What I'm asking is what is the best way to go about this and how to get it to interpolate onto the grid.

Thanks

yannaos April 3, 2014 14:58

The quickest and almost the best way would be just to use the fact that STAR-CCM+ can read tables and allows directly to use the tables as a profile for your initial field. Within the initial field velocity, for example, you just need to change the default from Constant to Table. The program will do the interpolation (linear) automatically for you.
If, on the other hand, you want to have more control on the points where you are going to specify your profile, first you export the coordinates of the centroids of your mesh. With your code, you create a table that associate your velocity with each centroid and then reimport again as the solution before. In this case the X,Y,Z values match the one from your mesh.
Note that, in both cases, you could even display the values you are importing by creating a field function from the table.
Finally, the best solution, but more difficult to implement would be to use User Coding as the method to specify your profile. In that way you could call your program, obtain directly the velocities and pass them to the code without writting to disk.


All times are GMT -4. The time now is 11:14.