CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   export velocity profile and import in an other simulation as initial condition (https://www.cfd-online.com/Forums/star-ccm/164197-export-velocity-profile-import-other-simulation-initial-condition.html)

FFD December 15, 2015 09:07

export velocity profile and import in an other simulation as initial condition
 
Hey guys,
I am changing in my simulations only a few parts to optimize them.
So I had the idea to use the final values like velocity of one simulation as the initial condition in another simulation. I have the hope that I don't need that many iteration to reach good results.

My idea is:
- create a xyz table (as trigger iterations? (I only need the final results. but I dont see how I can do this)
- as input parts I take a region
- as Scalar I choose the velocity (i,j,k and magnitude)
- extract and export the table.

If I open the table it is empty.
The User guide shows the general velocity per iteration.

But I want the velocity on every point in that region, so I can import it as the initial condition and the velocity is the same in every point.

Obviously I did something wrong. But I really don't know what right now.

Additionally I have some thoughts on what can cause a problem.

I have a different mesh on every simulation, there is are parts where before I had air and I do have air where I had parts before.

Do you have any suggestions?

-FFD

Deranda January 21, 2016 05:54

Hi FFD,

I think, that your idea might cause problems because of the different meshes. The new grid does not match to the old one, so the values of your simulation cant be committed.
But to achieve a faster convergence, you can save your velocity profile at the inlet and use it as an input for your new one.

best regards
Nils

cwl January 24, 2016 21:25

Use Field Function with interpolateTable().

kirrer January 27, 2016 12:50

I have similar issues extracting the data at every point. I've gotten around this by creating a very general threshold (ie, if the Z-coordinates of the file are 0-1.0 meter, I'll create a threshold for Z > -10 ). Then, the threshold contains every cell. If I use that threshold as an input to the table, it gets the data for every cell and you can export the table as you describe.

Another alternative is instead to export the mesh and solution - File > Export, then choose Mesh and Solution Data, select your regions and vector for Velocity. This file will be considerably bigger, but then upon import you can use a Volume Data Mapper to get data better mapped to the surface.

In my opinion, the best is a modified version of the first alternative. If you use a User Field Function called StaggeredCells with definition "mod($LocalCellIndex,20)", the resulting scalar is a pseudorandom integer between 0-19. Then you can set the Scalar to your threshold to be StaggeredCells < 0.5, and the resulting part will contain only every 20th cell. When you export data on this table, you get roughly the same velocity profile, but the table is much smaller and the interpolation CCM+ has to use is much faster.

Done in this way you can use a field function with interpolatePositionTable() get interpolate this data to your new volume mesh.

FFD February 5, 2016 07:27

Hello,
I just tried it with the xyz table and it worked for me.


All times are GMT -4. The time now is 15:37.