|
[Sponsors] |
October 2, 2017, 04:43 |
query for variable cell limit
|
#1 |
New Member
A Z
Join Date: Dec 2015
Posts: 16
Rep Power: 10 |
hey foamers,
I made a new solver based on scalarTransportFoam. I added a source term M0. My problem: The variable T (from scalarTransportFoam) exceeds the cell value of the source term M0. The source term value should be the maximum value. My idea: a query if T lager then M0 (in every cell). If its true set T=M0. I find here this: limit variable I want to do it like this way in the simple.loop() of my .c Code:
forAll(mesh.cellZones(), zoneI) { const cellZone& cz = mesh.cellZones()[zoneI]; const labelList& cells = cz; forAll(mesh.cellZones(), zoneI) { const cellZone& cz = mesh.cellZones()[zoneI]; const labelList& cells = cz; forAll(cells, iCells) { const label cellId = cells[iCells]; if (T()[cellId] > M0()[cellId]) { T()[cellId] = M0()[cellId]; } } } } Can anyone help me? Best regards |
|
Tags |
limit, variable |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compute/Extract cell wall distance | Ionut G | Fluent UDF and Scheme Programming | 0 | March 23, 2017 08:05 |
How to use "translation" in solidBodyMotionFunction in OpenFOAM | rupesh_w | OpenFOAM Running, Solving & CFD | 5 | August 16, 2016 05:27 |
[General] 2 datas on one plot | Akuji | ParaView | 46 | December 1, 2013 15:06 |
monitoring cell | Jane | Siemens | 2 | March 4, 2004 22:01 |
cell to cell relation | CMB | Siemens | 1 | December 4, 2003 05:05 |