|
[Sponsors] |
May 11, 2020, 06:11 |
Writing functions in OpenFOAM
|
#1 |
New Member
Join Date: Dec 2019
Posts: 3
Rep Power: 6 |
Hello everyone!
I am really new to OpenFOAM and I am wondering how I can define functions (for example velocity or forces or surface vectors in general as a function of coordinates).Can I write expressions inside the files of a case and specify functions, considering each patch? Or could I write different files and include them in the main ones (like a different file that's included in controlDict for instance)? Thank you very much in advance! Constance |
|
May 11, 2020, 18:19 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12 |
Hi,
- I would start by looking at the links below, which contain lots of useful information, tutorials and examples. I don't know how familiar you are with OpenFOAM, or C++, or CFD, but if you are new to most of them, I would start small with perseverance. The learning curve for OpenFOAM gets smoother every year, but still steep. - I think whatever one can do with bare C++ can be done in OpenFOAM, so the overall answer to your question is yes. - It would help forum people a lot if you can isolate your question, if possible. Good luck!
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
May 12, 2020, 03:59 |
|
#3 | |
New Member
Join Date: Dec 2019
Posts: 3
Rep Power: 6 |
Quote:
thank you very much for this fast reply and the links you provided, very helpful. I'm starting from there and if I end up in dead end, I'll be more specific to the next possible question. Thanks! |
||
May 12, 2020, 08:44 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
I just want to elaborate on the question a bit more.
Summing up: If the function objects that are already included in the toolbox are fitting your needs, you are happy and can use them on the fly. Otherwise, you need to make your functionality. Hope this will help you. Tobi
__________________
Keep foaming, Tobias Holzmann |
|
May 13, 2020, 03:36 |
|
#5 | |
New Member
Join Date: Dec 2019
Posts: 3
Rep Power: 6 |
Quote:
It is indeed helpful, getting to understand how it all works. Thank you very much for your reply as well! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 11:58 |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 02:36 |
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | September 21, 2016 11:50 |
[snappyHexMesh] crash sHM | H25E | OpenFOAM Meshing & Mesh Conversion | 11 | November 10, 2014 11:27 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 09:04 |