The problem is fixed.
Just update your svn working copy for Breeder_1.5, and recompile the library. Also make sure the environment variable FOAM_DEV is not defined when compiling the library for the OpenCFD version. Martin Quote:
|
Dear all,
How can I create my own functionObject ? my purpose is to extract a plane data of internal domain in every time step, and save to disk. I noticed "surfaces functionObject" can do the similar thing, so I want to modify surfaces functionObject.I found it belongs to sampling, So I copy src/sampling directory to another position. I changed the name to LIB = $(FOAM_USER_LIBBIN)/libmysampling. in sampling\sampledSurface\sampledSurfaces, I found 2 places had name "surfaces", *.H file: public: //- Runtime type information TypeName("surfaces"); *.C文file: PtrList<sampledSurface> newList ( dict.lookup("surfaces"), sampledSurface::iNew(mesh_) ); I changed these "surfaces" to "mysurfaces", and compiled, no problem. but when I used, had the following mistake, Starting time loop --> FOAM Warning : From function dlLibraryTable::open(const dictionary& dict, const word& libsEntry, const TablePtr tablePtr) in file lnInclude/dlLibraryTableTemplates.C at line 68 library "libmysampling.so" did not introduce any new entries Unknown function type mysurfaces Valid functions are : 5 ( surfaces fieldAverage fieldMinMax sets probes ) From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 89. FOAM exiting It seems that my modified name haven't been registed in functionObject. Could anyone can give me some help ? Thanks. I am using like this in my controlDict file: extraction { type mysurfaces; functionObjectLibs ("libmysampling.so"); enabled true; outputControl timeStep; outputInterval 1; surfaceFormat foamFile; interpolationScheme cellPointFace; fields ( U T ); mysurfaces ( aplane { type plane; basePoint (-0.4 0 0.5); normalVector (1.0 0 0); } ); } |
Quote:
Hi Bernhard, Is it possible to use panicDump to monitor and act on the mass flow through a patch? I would like my simulation to finish and end reasonably gracefully when the mass flow on a particular patch reaches a specified value. I am using the patchMassFlow function object to monitor the mass flow, which is great, but a mechanism for automatically stopping the run when the specified patchMassFlow value is reached would be even better. If this is possible, how do I go about setting it up? The code for panicDump is looking for a fieldName_ - Can I just insert the massFlow identifier here, or do I need to make some deeper modifications to the code? Also, what is the syntax fro the panicDump function? I have tried this: Code:
Any assistance would be gratefully received... R |
Quote:
Bernhard |
Quote:
I think that is probably beyond my level of programming, so i will look at another way of doing this. Cheers, R |
Hi,
I actually managed to solve my problem just before posting a question. Someone may have a hard time on this one in the future so I post it anyway. It took me a while to guess the correct syntax to specify a region for simpleFunctionObjects. My solver was chtMultiRegionSimpleFoam with correct region naming (fluid and solid) and I needed the average temperature of the solid. The correct region specification can be found below. Code:
T_average @controlDict: regions ( solid01 solid02 ); @logfile: Average of T : solid01 = 300 solid02 = 273 |
Quote:
Quote:
One workaround would be to use the variable replacement of OF to safe typing (this only works if functions is a dictionary, not a list): Code:
T_average1 You can write a feature request about the region-list too, but I don't think it is very likely that I'll do it as a) it is quite time consuming b) has the possibility to introduce a number of weird bugs Bernhard |
Hi Bernhard,
thank you for the detailed explanation. I have registered at sourceforge but somehow when I click the submit error button the page goes to a blank one and I get no confirmation about the successful report, and my report won't show up on the report page. It's maybe related to the fact that I cannot choose from a category under the Enter Report Details. It's required but no options show up, just the default (select). Maybe I have to make a bug report about the bug trucker as well?! :D |
Quote:
Seriously. I'm afraid there is not much I can do about this problem. The missing Category isn't the problem. Sounds more like a "didn't redirect the https to the right server in the server-farm"-problem at Sourceforge (possibly combined with a restrictive company firewall at your place) Could you try it again and see if it is reproducible? I know this is frustrating if you lost a quarter of an hour of work because you wrote a detailed bug-report. So just fill out the basics: Title and in the description a link to this conversation. You can always add a note later on if the server accepts the bug report If it doesn't work for you reproducible then I'll open the report and will add you (so that you get updates) |
1 Attachment(s)
Hi,
really appreciate your efforts! My issue won't go away, really strange, indeed. Code:
report the region on which the actual calculation is evaluated Thanks! |
Quote:
Will add the feature request to the local bug-database and get to it (probably the output will only occur for non-default regions. That way it won't break old customRegexp that I (and possibly other people) rely on) |
Quote:
I copy/pasted your information into the form and saw the behaviour you described (plain white window). Then I removed the additional information (desired input/output) from the form and it worked. Adding the information afterwards was not a problem. My guess is that some of the "weird" characters threw the application into an undefined state Bernhard |
Thank you, have added myself to the issue!
|
Bernhard,
thank you for your time and patience, I have updated swak and everything works. :) |
Dear Bernhard,
Thanks, it looks like your simpleFunctionObjects are exactly what I need. However, when I follow the instructions for compilation (wmake libso), I get an error similar to the one Juho mentioned (May 27, 2008): make: *** No rule to make target `/home/ahm_ubuntu/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/UPstream.H', needed by `trackDictionary/trackDictionaryFunctionObject.dep'. Stop. As you can see in the error message, I use OpenFOAM-1.6-ext. The simpleFunctionObjects I'm trying to compile are those intended for OpenFOAM-1.6. Does anyone know what I should do to fix this error? Thanks in advance! Sita |
Quote:
|
Thanks, that seems to help, but now I get new errors... Allwclean doesn't work (Allwclean: command not found), but wclean simpleFunctionObjects does. Also rmdepall worked.
The errors I get now are: /home/ahm_ubuntu/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/gcc-4.5.2/platforms/linux64GccDPOpt/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.5.2/include-fixed/features.h:338:25: fatal error: sys/cdefs.h: No such file or directory compilation terminated. compilation terminated. make: *** [Make/linux64GccDPOpt/simpleFunctionObject.o] Error 1 make: *** [Make/linux64GccDPOpt/simpleDataFunctionObject.o] Error 1 make: *** [Make/linux64GccDPOpt/timelineFunctionObject.o] Error 1 Something wrong with my ThirdParty directory? |
Quote:
sys/cdefs.h: that is a problem of your installation and in no way related to SFO |
Hmm… I think I'll just upgrade to foam-extend-3.0 and try again. Thanks for your help!
|
Which variables?
I find this thread the best place to ask this question:
I am looking for a list of variables I can do field operations on, e. g. fieldAverage, fieldMinMax, etc. I found some information about the new features added for version 2.2, but I have no idea what possibilities are available. |
All times are GMT -4. The time now is 12:57. |