|
[Sponsors] |
January 19, 2018, 02:22 |
How to change model constants with TUI-File?
|
#1 |
New Member
Sarah
Join Date: May 2017
Posts: 8
Rep Power: 9 |
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 |
|
January 19, 2018, 15:43 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,763
Rep Power: 66 |
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) Code:
(rpsetvar' sst-a1 0.32) Last edited by LuckyTran; January 19, 2018 at 17:15. |
|
January 19, 2018, 17:09 |
|
#3 |
New Member
Sarah
Join Date: May 2017
Posts: 8
Rep Power: 9 |
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. |
|
August 23, 2020, 07:05 |
|
#4 |
Senior Member
AH
Join Date: Apr 2014
Posts: 287
Rep Power: 0 |
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. |
|
August 24, 2020, 01:04 |
|
#5 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
TUI command to run k-e RNG
Code:
define models viscous> ke-rng? yes 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 |
|
|
|
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 |