CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   libsimpleFunctionObjects: functionObject name (http://www.cfd-online.com/Forums/openfoam-solving/119870-libsimplefunctionobjects-functionobject-name.html)

pad June 26, 2013 08:10

libsimpleFunctionObjects: functionObject name
 
Hello,

I need to calculate massflow at certain patches for which I use libsimpleFunctionObjects.so.

However, when I specify the function object to be e.g.

_massflow
{
type patchMassFlow;
functionObjectLibs ("libsimpleFunctionObjects.so");
verbose true;
patches
(
inflow
ami_21_30
ami_40_31
outflow
ami_31_40
ami_30_21
);
factor 3600.0;
}

the data will be saved in a folder named patchMassFlows__massflow. Is there a way to specify that patchMassFlows_ should not be included in the name?

It might seem to be a small problem but my postprocessing script relies on every functionObject to be saved under _<NAME>.

Regards
Per

gschaider June 26, 2013 11:37

Quote:

Originally Posted by pad (Post 436079)
Hello,

I need to calculate massflow at certain patches for which I use libsimpleFunctionObjects.so.

However, when I specify the function object to be e.g.

_massflow
{
type patchMassFlow;
functionObjectLibs ("libsimpleFunctionObjects.so");
verbose true;
patches
(
inflow
ami_21_30
ami_40_31
outflow
ami_31_40
ami_30_21
);
factor 3600.0;
}

the data will be saved in a folder named patchMassFlows__massflow. Is there a way to specify that patchMassFlows_ should not be included in the name?

It might seem to be a small problem but my postprocessing script relies on every functionObject to be saved under _<NAME>.

Regards
Per

Currently the hardcoded behaviour (to change it you'd have to go to the source) of the simpleFunctionObjects that write data is to compose the folder name from the type name and the FO-name. To make matters worse the latest release writes these folders to a sub-folder "postprocessing" (convention since OF 2.2)

Short answer: No

pad June 27, 2013 02:16

Hi Bernhard,

Thank you for your reply.

I don't like to modify the source code unless absolutely necessary so I guess for now I will modify my postprocessing scripts slightly.

Is there any particular reason for adding the typename in front of the FO name as this doesn't seem to be standard OF behaviour (at least in 2.1)? Or have I misunderstood something here?

Thanks again...

gschaider June 27, 2013 06:20

Quote:

Originally Posted by pad (Post 436247)
Hi Bernhard,

Thank you for your reply.

I don't like to modify the source code unless absolutely necessary so I guess for now I will modify my postprocessing scripts slightly.

Is there any particular reason for adding the typename in front of the FO name as this doesn't seem to be standard OF behaviour (at least in 2.1)? Or have I misunderstood something here?

Thanks again...

Well. Reason. Similar to yours:
- Scripts. Mine say "Ah. 'patchMassFlow_*'. I know how to handle that"
- It is easier to remove files. "rm patch*" throws away all the patch-stuff. I don't have to look around "Err. 'fooFlow' is what? Ah. patchMassFlow. OK. Let it go"

So basically the types were added to the directory names because I think that redundant information makes life easier


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