|
[Sponsors] |
June 5, 2017, 16:48 |
source code of UDF for Viscosity function ?
|
#1 |
Senior Member
ali
Join Date: Jul 2016
Posts: 147
Rep Power: 10 |
Hi All,
I want to write a source code of UDF for Viscosity function in mixture model: y = 3.8 * 0.001003 * (1-(x/0.62))^(-1.55) Please help me... Thanks |
|
June 5, 2017, 21:43 |
|
#2 |
New Member
jack li
Join Date: Apr 2017
Posts: 1
Rep Power: 0 |
#include "udf.h"
DEFINE_PROPERTY(viscosity,c,t) { real x[ND_ND]; real y,a; C_CENTROID(x,c,t); a = 1-x[0]/0.62; y = 3.8*0.001003*pow(a,-1.55); rerurn y; } |
|
June 5, 2017, 23:59 |
|
#3 |
Senior Member
ali
Join Date: Jul 2016
Posts: 147
Rep Power: 10 |
Thank you...
you mean is: return y; Last edited by ebtedaei; June 6, 2017 at 01:21. |
|
June 6, 2017, 01:28 |
|
#4 |
Senior Member
ali
Join Date: Jul 2016
Posts: 147
Rep Power: 10 |
At the function, the parameter "x" is equal to "volume fraction of particles" in Mixture model.
variation range of x : 20 - 30 How do I define it into the source code? Last edited by ebtedaei; June 6, 2017 at 13:07. |
|
June 26, 2017, 12:32 |
|
#5 |
Senior Member
ali
Join Date: Jul 2016
Posts: 147
Rep Power: 10 |
please help me...
|
|
July 12, 2017, 03:13 |
|
#6 |
Senior Member
ali
Join Date: Jul 2016
Posts: 147
Rep Power: 10 |
Hi All,
I'm using a multi-phase model. I need to write the UDF function for an output variable (derived from two other input parameters of each phase). But this variable does not exist in the inlet boundary conditions, so I can not add the udf function to its boundary conditions!!! what should I do? Thank you for advising. Last edited by ebtedaei; July 13, 2017 at 01:23. |
|
July 12, 2017, 06:41 |
|
#7 |
Member
I have to remain anonymous, I'm sorry.
Join Date: Jun 2017
Location: The Netherlands, Delft University of Technology
Posts: 48
Rep Power: 9 |
Maybe you could use a user defined scalar or user defined memory? Need more details to help you.
|
|
July 13, 2017, 01:45 |
|
#8 |
Senior Member
ali
Join Date: Jul 2016
Posts: 147
Rep Power: 10 |
I am using "mixture" multi-phase model and two fluids (Water and X) that Water Viscosity is constant but the X Viscosity is changed.
So Viscosity of the mixture phase is changed and I have to add a viscosity UDF to the inlet boundary conditions. As mentioned above, this variable does not exist in the inlet boundary conditions, so I can not add the udf function to its boundary conditions!!! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
OpenFOAM without MPI | kokizzu | OpenFOAM Installation | 4 | May 26, 2014 10:17 |
[swak4Foam] swak4Foam-groovyBC build problem | zxj160 | OpenFOAM Community Contributions | 18 | July 30, 2013 14:14 |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 10:31 |