|
[Sponsors] |
May 1, 2020, 23:52 |
3 phases mixture setting initial value
|
#1 |
New Member
Azim
Join Date: May 2020
Posts: 11
Rep Power: 5 |
Hi
i want put constant value of water and oil in a talk and use vof wave to create a wave. i dont know how i can give them their value like 50cm of my tank be water then 10 cm oil and rest of tank be air .how i can define this initial values? thanks. |
|
May 3, 2020, 00:57 |
initial function
|
#2 |
New Member
Azim
Join Date: May 2020
Posts: 11
Rep Power: 5 |
i think i need to define new function like this but i cant understand this code can any one explain it?
Function Name Initial Distribution (Air) Definition ($${Position}[0] >= -0.001) ? 1 : 0 |
|
May 7, 2020, 09:46 |
|
#3 |
Senior Member
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20 |
you could use the and logical operator in an expression eg
($${Position}[0] >= -0.001 && $${Position}[0] < 2.3 ) ? 1 : 0 say set the value to 1 if x is greater than -0.001 and less than 2.3 otherwise set to 0. see the help at User Interface > Expressions > Expression Syntax > Operators and Functions |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::printStack after large bounding epsilon events | StoneCFD727 | OpenFOAM Running, Solving & CFD | 1 | January 1, 2018 17:04 |
Free surface issues with interDyMFoam for hydroturbine | oumnion | OpenFOAM Running, Solving & CFD | 0 | October 6, 2017 14:05 |
HeatSource BC to the whole region in chtMultiRegionHeater | xsa | OpenFOAM Running, Solving & CFD | 3 | November 7, 2016 05:07 |
Cannot run the code properly: very large time step continuity error | crst15 | OpenFOAM Running, Solving & CFD | 9 | December 14, 2014 18:17 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 05:24 |