CFD Online Discussion Forums

CFD Online Discussion Forums (
-   STAR-CCM+ (
-   -   Creating 100 derived parts / Splitting derived parts for mass flux calculation (

xamo September 18, 2009 05:28

Creating 100 derived parts / Splitting derived parts for mass flux calculation

i got some kind of heat exchanger with a lot of tubes (> 100). I want to calculate the mass flux in every tube.

To receive a mass flux I usually make a constrained plane (derived parts / section / constrained plane). Under reports I choose this plane and let CCM calculate the mass flux.

But i do not want to make 100 constrained planes manually. It would be good, if there were something like "split non-continguous" for derived parts, but I cannot find that.

Maybe it is possible to program a makro, but I am not familiar with java.

Any suggestions?


highnelly September 18, 2009 09:42

Just a thought, so I might be way of the mark here; but what if you created your geometry with plates at the locations you want to get the mass flow; after you import you can then split by non-contiguous and your plates will be baffles-the default is an internal interface

SKK September 21, 2009 10:38

Create a constrained plane section for your first tube. While doing so, record the process as a java macro. Modify the java macro to loop for 100 times with an offset of the distance between your tubes, for example,

/ /loop for 100 times

int istepmax=100;

for (int istep=0;istep<istepmax;istep++) {
//offset each consequitive section by xoff in x direction


// The following is the co-ordinate of the initial plane section created + offset

(new double[] {0.3+xoff, -0.1, 0.01,
0.301+xoff, -0.1, 0.01,
0.301+xoff, -0.12, -0.01,
0.3+xoff, -0.12, -0.01}), units_0);

Once you have the constrained sections, you can use Reports to get area averaged mass flow rate or whatever that you need and then export the data using Tables from Tools section.

Hope this helps.

Maddin September 21, 2009 11:19

Massflow rate on a plane don't works.
You have to make a split to get it.
I often use a field function for this... ($$position[0] < 100) ? 0 : 1 etc.

SKK September 21, 2009 12:11

OK, I didn't try the exporting report in a table part, but you can get the mas flow for contraint plane sections through report. I have done exactly that for a similar study of a heat excahnger with more than 100 tubes. But may be there are easier way to do that than a macro...

highnelly September 21, 2009 12:19

If he doesn't want to split, I guess a similar macro can be used for a presentation grid, which can be used to get mass flow. I think it was a recent topic in this forum.

Maddin September 21, 2009 12:29

Ok I only tried Section Plane!

xamo September 29, 2009 03:54

I have tested the macro, and it worked. (with some small changes). But I hoped there would be an easier way. If you have a tube bundle heat exchanger you have to do another loop also.
In my opinion it would be easy for adapco to add a split option for derived parts, they already have it for boundaries.

@Maddin: Can you explain exactly, what you are doing to calculate the mass flow in a lot of tubes using field functions?


Maddin September 29, 2009 05:35

I create field function which you the scalar position with an "IF THEN ELSE" law.
But you to look what cell size you have to get a "plane" because some cells aren't the middle. And then I split by function. Other way I don't know.
I do this after the simulation is fine.

All times are GMT -4. The time now is 00:18.