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

Using the TUI to write/read profiles to update BC's?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 21, 2019, 11:18
Default Using the TUI to write/read profiles to update BC's?
  #1
Member
 
Sebi
Join Date: Mar 2019
Posts: 49
Rep Power: 7
bloodflow is on a distinguished road
For a cylinder of fluid with 2 phase flow, your inlet requires a VOF BC so lets put say 0.5 as an initial guess, which is applied uniformly to the inlet. In reality, this distribution may be different depending on their densities and visocisties. If you export the VOF at the outlet as a profile, and read it as the inlet VOF BC you now have a slightly better condition. If you repeat this several times you could generate a better approximation of the inlet VOF (Providing you have a cyclic velocity BC).

So far I am exporting the outlet VOF at the end of my solution using TUI, but then loading it as the inlet BC manually, and solving again using TUI and so on. Can I do this using the TUI entirely?

Some example;

PHP Code:
rc VOFProfile.cas
/solve/initialize/hyb-initialization
/solve/set/time-step 0.001
/solve/dti 800 75
/file/write-profileVOF-BC-1 outlet () highdensity-vof ()
exit
yes 
Is my current TUI which export the VOF profile at the outlet. Within the same run can read this profile and apply it to my inlet? (I imagine the code would look something like this)

PHP Code:
rc VOFProfile.cas
/solve/initialize/hyb-initialization
/solve/set/time-step 0.001
/solve/dti 800 75
/file/write-profileVOF-BC-1 outlet () highdensity-vof ()
/
file/read-profileVOF-BC-1
/define/boundary-conditions/velocity-inlet/multiphaseVOF-BC-()
/
solve/dti 800 75
/file/write-profileVOF-BC-2 outlet () highdensity-vof ()
/
file/read-profileVOF-BC-2
/define/boundary-conditions/velocity-inlet/multiphaseVOF-BC-()
...... 

Is this possible?
bloodflow is offline   Reply With Quote

Old   August 22, 2019, 00:54
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
you code is here, why is it impossible?
run it

In fluent GUI you can use calculation activities -> execute commands:
read journal file each 800 time steps

so you dont need to hardcopy each write/read iteration

Check, may be periodic boundary condition is suitable for you

best regards
AlexanderZ is offline   Reply With Quote

Old   August 22, 2019, 08:51
Default
  #3
Member
 
Sebi
Join Date: Mar 2019
Posts: 49
Rep Power: 7
bloodflow is on a distinguished road
rc profile.cas
/solve/initialize/hyb-initialization
/solve/set/time-step 0.008
/solve/dti 100 30
/file/write-profile/ VOF-1 outlet () rbc-vof ()
/file/read-profile/ VOF-1
/define/boundary-conditions/velocity-inlet inlet rbc no no yes yes yes yes udf "CoronaryVelocityWaveform::libudf" yes no outlet rbc-vof
/solve/dti 100 30

Is the code I ended up using or with a better explanantion:

/define/boundary-conditions/velocity-inlet "name of inlet" "name of 2ndary phase" no no "yes normal to boundary" "Yes to setting up velocity udf at inlet" "name of UDF compiled" "yes to profile for multiphase" "no to UDF for multiphase" "origin of profile" "variable name"
bloodflow 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
TUI commands for sample profiles in DPM bloodflow FLUENT 4 February 5, 2020 22:23
How to set BCs programmatically incompressible OpenFOAM Programming & Development 6 November 20, 2017 03:47
Change "Implicit Mesh Update Interval" using UDF ASimonsen Fluent UDF and Scheme Programming 2 October 12, 2017 10:38
Dealing with BC's in OF 1.6 vkrastev OpenFOAM Running, Solving & CFD 5 September 4, 2012 12:58
Understanding Code behind BCs Linse OpenFOAM Programming & Development 8 January 9, 2012 09:58


All times are GMT -4. The time now is 01:32.