|
[Sponsors] |
How to manipulat a volScalarField like this... |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 22, 2010, 17:38 |
How to manipulat a volScalarField like this...
|
#1 |
New Member
Xingzhi You
Join Date: May 2010
Posts: 7
Rep Power: 15 |
Hey there,
I get a volScalarField A,and another volScalarField B. And B is dependent on A as follows: if the value of a particular element in A is larger than a threshold, then the corresponding value of that element in B is a function of A as f1. else the value of B is a function of A as f2. I do not know how can I manipulate the volScalarField to attain such objective, and looking for some help...... Thanks a lot. |
|
June 22, 2010, 20:29 |
|
#2 |
New Member
Hans
Join Date: Jun 2010
Posts: 2
Rep Power: 0 |
I think what you need is just how to have access to the field value at a cell, judge it and accordingly made modification to another field.
forAll (A, celli) { if (A[celli]) > Threshold) B[celli] = f1(A[celli]); else B[celli] = f2(A[celli]); } Not sure if it is right. Hope more experienced Foamers can tell us how to do it. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to create initiate a volScalarField p without reading from disk NO_READ does not seem to work | dbxmcf | OpenFOAM Running, Solving & CFD | 14 | March 25, 2022 06:08 |
if-loop, volScalarField comparison | volker | OpenFOAM | 7 | March 6, 2020 20:03 |
Problems with creating a volScalarField | georlade | OpenFOAM Programming & Development | 4 | December 4, 2016 12:31 |
Definition of a linear function as volScalarField | titio | OpenFOAM Running, Solving & CFD | 1 | October 3, 2010 16:51 |
dimensioned volScalarField | lions85 | OpenFOAM | 1 | November 12, 2009 02:41 |