CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   Local Initial Conditions (https://www.cfd-online.com/Forums/star-ccm/215990-local-initial-conditions.html)

Flowmax March 25, 2019 00:29

Local Initial Conditions
 
1 Attachment(s)
I am trying to create a transient simulation in which different parts of the mesh will be initialized with different initial conditions. Specifically, one area is to have a high initial temperature and pressure, while the rest of the mesh should be at a lower temperature and pressure, before the two eventually equalize as gas discharges from the high pressure area. There should be no inlet, but there will be an outlet to prevent pressure buildup in the low pressure area. From what I have seen, the only way to have multiple areas with different initial conditions is to have separate physics continua, but this doesn't seem to allow for gas to flow from one area into the other. The image I have attached shows my domain. The cylinder highlighted by the red box is the high pressure area, the gas should then flow out through the narrow tube into the larger cylindrical area.

fluid23 March 25, 2019 11:16

I have posed this question (on a very different application) to our star-ccm support engineer before and was told that it was a fool's errand. For my application, the best thing was to use the grid sequencing function. However it requires that you use a coupled solver. If you have coupled implicit solver enabled you can go to Solvers > Coupled Implicit > Expert Initialization > Grid Sequencing to enable/configure.

That being said, I don't think that will work for the equalization problem you described. It will try to solve the boundary conditions and march your solution along rather than pressurize one chamber vs the other.

Just spit balling here, but one thing that comes to mind that you might try, and I have NO idea if this will actually work, is to place a porous baffle between the two regions and assign a restriction which is very very high (effectively infinite within the limits of the software) and then changes over time (probably not instantly) to zero allowing the high p/T flow to move past. That way your boundary conditions can set the conditions in the separate areas before the 'wall' between them 'disappears'.

Can you explain what it is you are trying to get out of this model? The community may be able to offer suggestions for a better geometry/setup.

me3840 March 25, 2019 19:52

You can easily specify different initial conditions in different areas of the mesh by using field functions. Your geometry would lend itself well to using a cylindrical coordinate system. You would then specify different values of pressure and temperature for varying axial position.

I don't really see anything foolish about the setup, it seems logical to me. Since it depends heavily on getting the initial transients resolved the timestep will have to be quite small in the beginning.

LuckyTran March 26, 2019 09:07

1) Field functions if you can come up with the appropriate boolean logic

2) csv tables and/or a data mapper into a field function
3) again data mappers but utilizing shapes to in combination with field functions to map everything into a new field function. This is quite convoluted. The easiest way is to do a simple field function such that T=low for x< number and T = high for x > number etc.


Quote:

Originally Posted by fluid23 (Post 728797)
I have posed this question (on a very different application) to our star-ccm support engineer before and was told that it was a fool's errand. For my application, the best thing was to use the grid sequencing function. However it requires that you use a coupled solver. If you have coupled implicit solver enabled you can go to Solvers > Coupled Implicit > Expert Initialization > Grid Sequencing to enable/configure.

That being said, I don't think that will work for the equalization problem you described. It will try to solve the boundary conditions and march your solution along rather than pressurize one chamber vs the other.

Just spit balling here, but one thing that comes to mind that you might try, and I have NO idea if this will actually work, is to place a porous baffle between the two regions and assign a restriction which is very very high (effectively infinite within the limits of the software) and then changes over time (probably not instantly) to zero allowing the high p/T flow to move past. That way your boundary conditions can set the conditions in the separate areas before the 'wall' between them 'disappears'.

Can you explain what it is you are trying to get out of this model? The community may be able to offer suggestions for a better geometry/setup.


ummm what? This is a very practical question of how to initialize a non-uniform field. What does grid sequencing and porous baffles have to do with initialization? smh

me3840 March 26, 2019 18:40

Quote:

Originally Posted by LuckyTran (Post 728904)
2) csv tables and/or a data mapper into a field function


While using a table by itself can be used to initialize a domain, I would strongly recommend against doing so. The reason is that tables in STAR are not parallelized; each process gets a copy of the table. So if your table is large (say, the size of the volume mesh) you would be storing one copy of the table for each parallel partition in memory, which is often very expensive.

Fortunately the data mappers are an excellent alternative which are implemented in a parallel fashion, and there's even a table data mapper. Just remember to delete the table if you choose to use it (and if your table is large).


All times are GMT -4. The time now is 16:24.