CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Journal file UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 27, 2020, 16:16
Default Journal file UDF
  #1
p.1
New Member
 
Italia
Join Date: Oct 2020
Posts: 19
Rep Power: 6
p.1 is on a distinguished road
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?
p.1 is offline   Reply With Quote

Old   November 28, 2020, 02:42
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
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.
pakk is offline   Reply With Quote

Old   November 28, 2020, 03:14
Default
  #3
p.1
New Member
 
Italia
Join Date: Oct 2020
Posts: 19
Rep Power: 6
p.1 is on a distinguished road
Quote:
Originally Posted by pakk View Post
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.
Where I can find the commands I have to use?
p.1 is offline   Reply With Quote

Old   November 28, 2020, 04:26
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
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.
pakk is offline   Reply With Quote

Old   November 28, 2020, 04:27
Default
  #5
p.1
New Member
 
Italia
Join Date: Oct 2020
Posts: 19
Rep Power: 6
p.1 is on a distinguished road
Quote:
Originally Posted by pakk View Post
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.
Thank you.
p.1 is offline   Reply With Quote

Old   November 28, 2020, 05:50
Default
  #6
p.1
New Member
 
Italia
Join Date: Oct 2020
Posts: 19
Rep Power: 6
p.1 is on a distinguished road
Quote:
Originally Posted by pakk View Post
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.
I did it. Thank you.

Last edited by p.1; November 28, 2020 at 07:28.
p.1 is offline   Reply With Quote

Old   November 30, 2020, 00:12
Default
  #7
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Quote:
Originally Posted by p.1 View Post
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?


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
zimao likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


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