|
[Sponsors] |
November 27, 2020, 16:16 |
Journal file UDF
|
#1 |
New Member
Italia
Join Date: Oct 2020
Posts: 19
Rep Power: 6 |
Hi, there's a way to write a journal file for compiling a UDF (without hooking the function), run calculate for one time step, hooking the function and run calculate for other time steps?
|
|
November 28, 2020, 02:42 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Yes.
Use the TUI to find out which commands you need to use. Honestly, it's very annoying to do (everything has to be 100% correct to work), but it can be done, I have done similar things before. I can not give concrete code, I'm sorry. |
|
November 28, 2020, 03:14 |
|
#3 |
New Member
Italia
Join Date: Oct 2020
Posts: 19
Rep Power: 6 |
Where I can find the commands I have to use?
|
|
November 28, 2020, 04:26 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Press enter in the TUI, you get a menu with options. Think logically which submenu is most likely to have what you want, and continue from there.
|
|
November 28, 2020, 04:27 |
|
#5 |
New Member
Italia
Join Date: Oct 2020
Posts: 19
Rep Power: 6 |
||
November 28, 2020, 05:50 |
|
#6 |
New Member
Italia
Join Date: Oct 2020
Posts: 19
Rep Power: 6 |
I did it. Thank you.
Last edited by p.1; November 28, 2020 at 07:28. |
|
November 30, 2020, 00:12 |
|
#7 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Quote:
Code:
(ti-menu-load-string (format #f "define user-defined compiled-functions compile? name_of_my_udf_library yes my_udf_source.c \n \n " )) (ti-menu-load-string (format #f "solve initialize initialize-flow")) (ti-menu-load-string (format #f "solve set t-s 1")) ;;;timestep size 1 sec (ti-menu-load-string (format #f "solve d-t-i 1 30")) ;;;make 1 time step with 30 iterations inside (ti-menu-load-string (format #f "define user-defined compiled-functions load name_of_my_udf_library" )) (ti-menu-load-string (format #f "define user-defined function-hooks adjust \"my_adjust_tebha::name_of_my_udf_library\" \n" )) (ti-menu-load-string (format #f "solve set t-s 10")) ;;;timestep size 10 sec (ti-menu-load-string (format #f "solve d-t-i 100 30")) ;;;make 100 time step with 30 iterations inside
__________________
best regards ****************************** press LIKE if this message was helpful |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using PengRobinsonGas EoS with sprayFoam | Jabo | OpenFOAM Running, Solving & CFD | 36 | July 16, 2024 04:52 |
[OpenFOAM.com] swak4foam compiling issues on a cluster | saj216 | OpenFOAM Installation | 5 | January 17, 2023 17:05 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
centOS 5.6 : paraFoam not working | yossi | OpenFOAM Installation | 2 | October 9, 2013 02:41 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |