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

How to change model constants with TUI-File?

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By Sarah_Fluent
  • 2 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2018, 02:22
Default How to change model constants with TUI-File?
  #1
New Member
 
Sarah
Join Date: May 2017
Posts: 8
Rep Power: 9
Sarah_Fluent is on a distinguished road
Hello everybody,

I have written a TUI File that builds my model and solves it.
Extract: /define/models/viscous/kw-sst yes

The whole file is implemented in a batch file so I can run it iteratively.

Now I would like to change the model constants of my k-omega-sst- model, like "a1" or the "wall prandtl number".

I have not found out how this can be done by TUI.

Is that not possible? I have looked through the text command list but I did not find it.


Best regards
Sarah
mechmech likes this.
Sarah_Fluent is offline   Reply With Quote

Old   January 19, 2018, 15:43
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,763
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
It's possible but not so easily.

You have to use the rpsetvar command and manually set the variables, which means you have to know their built-in names. And as you know, the names are not documented anywhere.

But remember that the case file contains all the information about your setup and the case file can be read by a text editor (as long as you don't save in binary language & as long as you have enough memory to open the entire mesh). It helps to have a small case file for testing purposes where you can easily do this. Now if you were to open the .cas file you would find lines like the following, somewhere:

Code:
(kw-not-trans-sst-production-limiter? #t)
(kw-not-trans-sst-kato-launder? #f)
(kw-sst-min-visc/apply-below-f2-value 0.)
(kw-sst-min-visc-ratio 0.)
(sst-pk-lam-factor 0.)
(sst-po-lam-factor 0.)
(sst-pk-factor 10.)
(sst-kappa 0.41)
(sst-beta-i2 0.0828)
(sst-beta-i1 0.075)
(sst-a1 0.31)
(sst-sig-w2 1.168)
(sst-sig-w1 2.)
(sst-sig-k2 1.)
(sst-sig-k1 1.176)
.
.
.
(keprt 0.85)
.
.
.
(wallprt 0.85)
Notice these names are not the same as the labels in the GUI, but it should not be too difficult to figure out. Now you can change the a1 constant from 0.31 to 0.32 by doing for example:
Code:
(rpsetvar' sst-a1 0.32)
I recommend to verify that you have done it correctly using a GUI session. Since you may not be sure if you have changed the right variable. e.g. keprt is also the energy turbulent prandtl number even for kw-sst and vars like ssg-k1 and sst-sig-w1 are labeled TKE and SDR Prandtl # in the GUI. If you are familiar with the model equations, it is more intuitive why they are labeled sig-k and sig-w.
sadjad.s and mechmech like this.

Last edited by LuckyTran; January 19, 2018 at 17:15.
LuckyTran is offline   Reply With Quote

Old   January 19, 2018, 17:09
Default
  #3
New Member
 
Sarah
Join Date: May 2017
Posts: 8
Rep Power: 9
Sarah_Fluent is on a distinguished road
Thank you very much!

I will try thar approach. What I did to know was recording a journal file where I only save the variable, extract the commands and this works quite well. But for saving some lines, I will implement your proposal.
Sarah_Fluent is offline   Reply With Quote

Old   August 23, 2020, 07:05
Default
  #4
Senior Member
 
AH
Join Date: Apr 2014
Posts: 287
Rep Power: 0
visitor is on a distinguished road
This is interesting. I was looking for away in changing turbulence model depending on a conditional statement.

If temperature per a cell is greater than 500K use k-e RNG
Else use k-e

Don't know how to write such a conditional statement in a TUI.

Hope someone can show an example, thanks.
visitor is offline   Reply With Quote

Old   August 24, 2020, 01:04
Default
  #5
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
TUI command to run k-e RNG
Code:
define models viscous> ke-rng? yes
you need scheme script + TUI commands to define this condition

1. Get temperature
2. compare with criteria
3. execute condition

you may run this script on each timestep using execute commands
__________________
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
Custom Thermophysical Properties wsmith02 OpenFOAM 4 June 1, 2023 15:30
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 18:25
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 11:03
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 10:07
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 02:41


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