|
[Sponsors] |
How to compare volume scalar field with constant values |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 24, 2009, 13:59 |
How to compare volume scalar field with constant values
|
#1 |
Member
Sachin Kanetkar
Join Date: Mar 2009
Posts: 57
Rep Power: 17 |
Hi,
I wanted to compare one volscalarfield w.r.t a constant value To be more precise if I want to compare enthalpy h with specific value say enthalpy of sat liq i need to find in all h values i.e forAll(arg1,arg2) what should these arguments be Please do let me know thanks sachin |
|
November 24, 2009, 14:05 |
|
#2 |
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23 |
Something like:
Code:
forAll(enthalpy,celli) { if(enthalpy[celli] == satEnthalpy){} else{} }
__________________
Laurence R. McGlashan :: Website |
|
November 24, 2009, 14:07 |
|
#3 |
Member
Sachin Kanetkar
Join Date: Mar 2009
Posts: 57
Rep Power: 17 |
thanks for your quick reply,
I was having a basic idea...was just missing the arguments sachin |
|
November 24, 2009, 14:09 |
|
#4 |
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23 |
That's probably a bit sloppy for a volScalarField.
Code:
forAll(enthalpy.internalField(),celli) { if(enthalpy[celli] == satEnthalpy){} else{} }
__________________
Laurence R. McGlashan :: Website |
|
April 11, 2019, 04:34 |
|
#5 | |
New Member
Anna
Join Date: Feb 2019
Posts: 17
Rep Power: 7 |
Hi there!
I'm trying to compare one volScalarField with one scalar, but It doesn't work properly. I've used the code posted in previous post but it doesn´t get correct values. My code is: Quote:
Thanks! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] CuBit | t42 | OpenFOAM Meshing & Mesh Conversion | 6 | July 10, 2008 08:51 |
Constant field inside the volume | Ben Makhal | CFX | 10 | February 6, 2008 17:32 |
from a vecor field to get a gradient of scalar | dusky.he | Main CFD Forum | 4 | March 30, 2007 10:08 |
transient temperature field with constant velocity | Törnquist | CFX | 0 | September 16, 2003 05:22 |
Scalar summation over whole volume | Jakub | CFX | 2 | April 18, 2002 13:21 |