|
[Sponsors] |
How to compare volume scalar field with constant values |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#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 |
|
![]() |
![]() |
![]() |
![]() |
#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 |
|
![]() |
![]() |
![]() |
![]() |
#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 |
|
![]() |
![]() |
![]() |
![]() |
#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 |
|
![]() |
![]() |
![]() |
![]() |
#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! |
||
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] CuBit | t42 | OpenFOAM Meshing & Mesh Conversion | 6 | July 10, 2008 07:51 |
Constant field inside the volume | Ben Makhal | CFX | 10 | February 6, 2008 16:32 |
from a vecor field to get a gradient of scalar | dusky.he | Main CFD Forum | 4 | March 30, 2007 09:08 |
transient temperature field with constant velocity | Törnquist | CFX | 0 | September 16, 2003 04:22 |
Scalar summation over whole volume | Jakub | CFX | 2 | April 18, 2002 12:21 |