CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Collection of simple functionObjects (https://www.cfd-online.com/Forums/openfoam/60812-collection-simple-functionobjects.html)

gschaider June 7, 2014 07:12

Quote:

Originally Posted by Shahr (Post 495944)
I find this thread the best place to ask this question:

I disagree. This thread is about a package called simpleFunctionObjects which is not part of the OF release but of an addition called swak4Foam

Quote:

Originally Posted by Shahr (Post 495944)
I am looking for a list of variables I can do field operations on, e. g. fieldAverage, fieldMinMax, etc.

Basically every variable that is in memory. Check the output in directory 0.1 called foo then there is a variable foo you can exist. Of course fields that are not written are not found that way

Quote:

Originally Posted by Shahr (Post 495944)
I found some information about the new features added for version 2.2,
but I have no idea what possibilities are available.

There is a function object called listRegisteredObjects in swak4Foam/simpleFunctionObjects that gives you such a list. There may be similar FO in plain OF (but it wasn't at the time I wrote that FO). But to use that you'll have to install a full swak4Foam (sorry)

Shahr June 14, 2014 09:26

Thanks Bernhard. My bad, I thought simpleFunctionObjects are part of main OF distribution, not swak4Foam. Nevertheless I checked listRegisteredObjects and found the list.

However, I would also like to know which fields are written into memory, and can be used/accessed by the main openfoam functionObjects, such as probes, fieldAverages, etc. Some of my runtime post-processing functions are to be OF built-in features.

gschaider June 14, 2014 16:40

Quote:

Originally Posted by Shahr (Post 497027)
Thanks Bernhard. My bad, I thought simpleFunctionObjects are part of main OF distribution, not swak4Foam. Nevertheless I checked listRegisteredObjects and found the list.

However, I would also like to know which fields are written into memory, and can be used/accessed by the main openfoam functionObjects, such as probes, fieldAverages, etc. Some of my runtime post-processing functions are to be OF built-in features.

What listRegisteredObjects lists is exactly that: all objects that can be accessed by others with simple knowledge of the name (or as you say: fields in memory).

Probes for example are not in that list because they are instantiated by the probes-functionObject. They can not be accessed from outside the functionObject

Shahr June 14, 2014 17:12

Well, thanks again. I found another possibility before your reply, and that is the writeRegisteredObject. I tried it and can confirm that it generates the same list as listRegisteredObjects from swak.
I guess the next step for me is to add the fields I need to the createFields so that I can use swak on them.
Huge thanks by the way for this amazing set of tools you wrote. It makes working with openfoam a bliss for a C++ illiterate user like me.

gschaider June 15, 2014 14:32

Quote:

Originally Posted by Shahr (Post 497056)
Well, thanks again. I found another possibility before your reply, and that is the writeRegisteredObject. I tried it and can confirm that it generates the same list as listRegisteredObjects from swak.

Which OF-version? The writeRegisteredObject I have the sources to is used to write objects that otherwise wouldn't be written. It relates to listRegisteredObjects like "cat" (the command) relates to "ls"

Quote:

Originally Posted by Shahr (Post 497056)
I guess the next step for me is to add the fields I need to the createFields so that I can use swak on them.
Huge thanks by the way for this amazing set of tools you wrote. It makes working with openfoam a bliss for a C++ illiterate user like me.

Thanks.

Shahr June 25, 2014 08:42

Sorry for the delay. I used it on OF23x. The output were similar tables only with different formatting. As I remember they contained same entries.

gschaider July 2, 2014 18:13

Quote:

Originally Posted by Shahr (Post 498616)
Sorry for the delay. I used it on OF23x. The output were similar tables only with different formatting. As I remember they contained same entries.

My guess: the list of objects in the error message if you specify a non-existing object

ron_OFuser July 31, 2014 08:17

Hello Bernhard,

Is it possible to write drag coefficient on the cylinder using the swak4Foam-or-functionObjects for non-newtonian fluids?

:confused:

gschaider July 31, 2014 10:06

Quote:

Originally Posted by ron_OFuser (Post 503909)
Hello Bernhard,

Is it possible to write drag coefficient on the cylinder using the swak4Foam-or-functionObjects for non-newtonian fluids?

:confused:

Of course. If you can calculate the drag force correctly


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