|
[Sponsors] |
Calculation of gradient only for subset of cells to improve performance |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 11, 2016, 10:35 |
Calculation of gradient only for subset of cells to improve performance
|
#1 |
Member
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10 |
Hello Foamers,
is there a way to calculate the gradient (or any other OF tensor operation) for only a subset of cells that fulfill a given condition? In my case, I need a concentration gradient Xv only near the phase interphase, that is where eps < alpha1 < 1-eps. Since most of the cells in the domain are not close to the interface, calculating the gradient in them is a waste of computational time. I can easily limit normal calculations to the required cells using: Code:
forAll(alpha1, celli) { if(alpha1[celli] > eps && alpha1[celli] < 1-eps) { // ... calculation ... } } |
|
Tags |
conditional, conditional computation, gradient, limit |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Periodic flow using Cyclic - comparison with Fluent | nusivares | OpenFOAM Running, Solving & CFD | 30 | December 12, 2017 06:35 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
[ICEM] error analysis | despaired student | ANSYS Meshing & Geometry | 7 | June 27, 2012 12:57 |
[snappyHexMesh] snappyHexMesh aborting | Tobi | OpenFOAM Meshing & Mesh Conversion | 0 | November 10, 2010 04:23 |
Gradient calculation in CFD | apurva shukla | Main CFD Forum | 1 | August 21, 1998 08:05 |