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

Value of a UDF depending on another UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2018, 06:17
Post Value of a UDF depending on another UDF
  #1
New Member
 
Join Date: Nov 2018
Posts: 1
Rep Power: 0
Mkouu67 is on a distinguished road
Hi everyone,


As an attachment, an illustration of the problem. This models a cylinder with an inlet and outlet and piston movement.


- Case 1: When the piston goes down, we have mass flow at intlet and a closed outlet.


- Case 2: When the piston goes up, we have a closed inlet and a pressure at outlet.


I have write the UDF for the movement of the piston.


I want to write a UDF for the inlet and outlet depending on the movement of the piston, i.e. when the acceleration is negativ -> Case 1 ; when the acceleration is positiv -> Case 2



Do i have to use UDM Macros ? In order to change the type of the boundary (mass flow inlet to wall), may I have to use a Scheme file and the TUI-Command or use a journal file?


Thnank you.


Regards,


M.
Attached Images
File Type: png Unbenannt.PNG (11.8 KB, 2 views)
Mkouu67 is offline   Reply With Quote

Old   November 27, 2018, 23:48
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
according to my knowledge as of now we may change boundary condition using scheme only.

as I know, you cant execute scheme/journal from UDF -> so you should think how you will execute UDF from scheme/journal

best regards
AlexanderZ is offline   Reply With Quote

Old   December 5, 2018, 15:39
Default
  #3
New Member
 
Sanket Dange
Join Date: Jul 2013
Posts: 9
Rep Power: 12
sanketdange2007 is on a distinguished road
Quote:
Originally Posted by Mkouu67 View Post
Hi everyone,


As an attachment, an illustration of the problem. This models a cylinder with an inlet and outlet and piston movement.


- Case 1: When the piston goes down, we have mass flow at intlet and a closed outlet.


- Case 2: When the piston goes up, we have a closed inlet and a pressure at outlet.


I have write the UDF for the movement of the piston.


I want to write a UDF for the inlet and outlet depending on the movement of the piston, i.e. when the acceleration is negativ -> Case 1 ; when the acceleration is positiv -> Case 2



Do i have to use UDM Macros ? In order to change the type of the boundary (mass flow inlet to wall), may I have to use a Scheme file and the TUI-Command or use a journal file?


Thnank you.


Regards,


M.
I assume that this is a transient simulation and piston movement is periodic (repeating after certain time).
This is a tricky problem. Solution to this is to use scheme or journal file and write TUI commands in it to flip boundary conditions after appropriate number of time steps.

Just to elaborate, if piston is going down from time step 0 to 10 then after time step 10 BCs will get flip, similarly after time step 20 and so on till the simulation ends.
Also you will have to drive your simulation from scheme or journal file.
sanketdange2007 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
UDF for vapor pressure anuarun Fluent UDF and Scheme Programming 12 December 24, 2021 10:12
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 07:26
Parallelize UDF? Which kind of UDF? Lilly FLUENT 5 March 25, 2014 02:05
DEFINE_GEOM UDF Problems Pat FLUENT 0 August 14, 2003 13:16
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 14:17.