Field Function Conditional Expressions
Hi,
Im trying to use field functions to refine my mesh, but my conditional expression for my refinement table is written incorectly. I want my mesh to be finer in the areas where the velocity is over 0.4m/s and also in the areas where the temperature is over 293K. The two expressions shown below work fine individually but i need to combine the two to generate the one mesh refinement table...any ideas? ($RelativeVelocityMagnitude > 0.04) ? 0.038 : 0.08 ($Temperature > 293) ? 0.038 : 0.08 Thanks in advance |
Try using the and '&&' logical operator?
Maybe this? (($RelativeVelocityMagnitude > 0.04) && ($Temperature > 293)) ? 0.038 : 0.08 |
Thanks for the reply. I used the logical operator '&&' but this only refines the mesh in the areas where both the velocity is > 0.4 and the temperature is > 293. I need to refine the mesh in the areas where either of these conditions are met.
|
Then you can use the OR logical operator '||' since if either of these requirement are met, then it will refine the mesh.
So it should be (($RelativeVelocityMagnitude > 0.04) || ($Temperature > 293)) ? 0.038 : 0.08 |
It worked perfectly, thanks very much.
|
All times are GMT -4. The time now is 00:02. |