|
[Sponsors] |
July 26, 2024, 12:02 |
postProcess: How to compute -grad?
|
#1 |
Member
Ali B.
Join Date: Mar 2020
Location: abzrg.github.io
Posts: 44
Rep Power: 6 |
Dear all,
With postProcess -func "grad(V)" -latestTime I can compute the gradient of V (electric potential), for the latest written iteration (for a steady state simulation). However, how can I compute the multiply gradient of a field by -1? The problem is I cannot use the following: Code:
--> FOAM FATAL IO ERROR: (openfoam-2312) Wrong token type - expected word, found on line 0: label -1 I would also like to give the resulting field a name. For example, when I compute grad(magSqr(V))it produces a field with the name: grad(magSqr(V)). I want to give it the name EdotGradE. $FOAM_API: 2312 |
|
July 29, 2024, 09:58 |
|
#2 |
Member
Ali B.
Join Date: Mar 2020
Location: abzrg.github.io
Posts: 44
Rep Power: 6 |
To restate my problem in a simpler way, how to multiply a field by a scalar?
I think OpenFOAM foundation has a `scale` function object but it seems that OpenFOAM-ESI does not have any way to do that, as far I know. |
|
July 30, 2024, 10:24 |
|
#3 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
Hello,
In the OpenCFD branch, have a look at the reference and exprFields function objects. Regards, Yann |
|
August 2, 2024, 17:46 |
|
#4 |
Member
Ali B.
Join Date: Mar 2020
Location: abzrg.github.io
Posts: 44
Rep Power: 6 |
Thank you Yann!
I think that will do it. I will use it in the future (I wrote a new solver just for that in last few days). |
|
Tags |
postprocess |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
StarCCMS+ on AWS Parallel Cluster not distributing workload across multiple nodes | dwagoner | STAR-CCM+ | 3 | May 25, 2021 03:39 |
Drag Coefficient Gradient: 0 in 2d adjoint optimization | tomp1993 | SU2 Shape Design | 11 | August 1, 2019 16:14 |
postProcess functionality in openFOAM 4 | bullmut | OpenFOAM Post-Processing | 23 | July 21, 2017 10:11 |
Compute Cluster with diskless compute nodes | Pauli | Hardware | 0 | October 6, 2015 17:48 |
Cluster ID's not contiguous in compute-nodes domain. ??? | Shogan | FLUENT | 1 | May 28, 2014 16:03 |