|
[Sponsors] |
what is useUserTime flag in function objects? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 21, 2023, 15:57 |
what is useUserTime flag in function objects?
|
#1 |
Senior Member
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5 |
Hi,
In function objects, there is a flag 'useUserTime'. Could you please explain what does thid flag do? what is its purpose? Any examples to clarify this are appreciated. Regards
__________________
Don't keep making the same mistakes. Try to make new mistakes. |
|
January 4, 2024, 04:52 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Did you already read the documentation note on writeFile.H ?
|
|
January 4, 2024, 05:30 |
|
#3 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14 |
This may save you some time in the future, and allow you to avoid pointless posts .
1. Open up Doxygen (you are using the ESI version, I think, so that would be https://www.openfoam.com/documentati...doc/index.html). 2. Type in the thing that you are searching for in the search box, i.e. useUserTime here; if it finds the search item, a drop down of hyperlink(s) will appear with all items starting with your string - click on the appropriate one 3. this will open up the Doxygen pages for the thing you are searching for. In other words, within just a few seconds you would get: Code:
bool useUserTime_ protected Flag to use the specified user time, e.g. CA deg instead of seconds. Default = true Definition at line 152 of file writeFile.H. Doxygen can be a bit clunky sometimes, but is your key to unlocking the mysteries of OF! Good luck and Happy New Year! |
|
January 4, 2024, 05:41 |
|
#4 | |
Senior Member
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5 |
Quote:
But the description does not make sense for me at all. The short description says: "... to use the specified user time..": What is a user time? how can I specify it? Also in the description: "CA deg instead of seconds": What is CA deg????? You can see clearly that this description does not make sense without context, that's why I have asked for clarification and examples. Best regards
__________________
Don't keep making the same mistakes. Try to make new mistakes. |
||
January 4, 2024, 05:43 |
|
#5 |
Senior Member
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5 |
Thank you for your reply. Yes, I have checked the documentation, but unfortunately it is not clear. An example showing how to use this flag in practice would be much helpful.
Thank you.
__________________
Don't keep making the same mistakes. Try to make new mistakes. |
|
January 4, 2024, 06:03 |
|
#6 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14 |
Aaah - well, now that's a much better question. "CA" stands for crank angle and comes from the development of engineFoam I believe (correct me Mark if I am wrong).
The userTime is whatever you want it to be ... it suggests degrees in the header, but it could be anything. To see what the useUserTime flag does, take a look at writeFile.C, where you'll see: Code:
if (useUserTime_) { timeValue = fileObr_.time().timeToUserTime(timeValue); } const word timeName = Time::timeName(timeValue); If you really want to dig into it, I suggest starting with https://www.openfoam.com/documentati...9ee65af8a.html ... and in particular https://www.openfoam.com/documentati...8C_source.html where you'll see the above being implemented. I found this pretty quickly with a command line grep command. Good luck again. |
|
January 4, 2024, 07:01 |
|
#7 | |
Senior Member
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5 |
Quote:
Nice explanation Assuming that I understand that and it does what I think it does, I wonder how I can use this in my simulations. Is there a minimal tutorial where this is used? can I use it with pimpleFoam? how?
__________________
Don't keep making the same mistakes. Try to make new mistakes. |
||
January 4, 2024, 08:01 |
|
#8 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14 |
No - I don't think so - it's a much more fundamental feature, and you would have to build it into a bespoke solver, including your own definition of the time class etc. This probably means redefining a whole bunch of classes ... but that's just speculation on my part, I haven't researched it fully. The engineFoam solver that I pointed you to gives you an idea of the effort involved.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error in enabling the python wrapper | Jinn | SU2 Installation | 2 | April 23, 2022 14:52 |
whats the cause of error? | immortality | OpenFOAM Running, Solving & CFD | 13 | March 24, 2021 08:15 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 14:06 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |