|
[Sponsors] |
March 28, 2016, 09:24 |
Using Min and Max operators OpenFOAM
|
#1 |
Member
Upuli
Join Date: Feb 2016
Posts: 68
Rep Power: 10 |
Dear All
I have two functions, f and g . I want to get the minimum and maximum of two . How can I write it in OpenFOam Thanks |
|
March 28, 2016, 10:16 |
|
#2 |
Member
Bijan Darbari
Join Date: Nov 2015
Posts: 48
Rep Power: 10 |
hello
I think: Code:
Info<< "min/max value = " << min(f).value() << ", " << max(f).value() << endl; |
|
March 28, 2016, 23:13 |
Using Min and Max operators OpenFOAM
|
#3 |
Member
Upuli
Join Date: Feb 2016
Posts: 68
Rep Power: 10 |
Dear bijan
Thank you.I'll try with it. |
|
June 7, 2021, 11:51 |
|
#4 |
New Member
Join Date: Aug 2020
Posts: 7
Rep Power: 5 |
Hi
I want compare two equations and the maximum should go into the function. How to write code for this in OF. example : G = max (a/b , c/d) Thanks in advance. |
|
July 28, 2022, 04:46 |
|
#5 |
New Member
Feng
Join Date: Apr 2017
Posts: 9
Rep Power: 9 |
hi Kannan86
Have you solved this problem? when i get the max of two fields, e.g. : volScalarField fun = max(fun1,fun2); compiling is OK, but when i run the code, the screan show the following error: Arguments of max have different dimensions dimensions : [0 0 1 0 0 0 0] and [0 0 1 0 0 0 0] Thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
y+ and u+ values with low-Re RANS turbulence models: utility + testcase | florian_krause | OpenFOAM | 114 | August 23, 2023 05:37 |
Near wall treatment in k-omega SST | Arnoldinho | OpenFOAM Running, Solving & CFD | 38 | March 8, 2017 13:48 |
multiphaseEulerFoam (OF2.3.0) : Courant number explodes when running in parallel | Mehrez | OpenFOAM Running, Solving & CFD | 10 | May 18, 2016 11:44 |
Problem of simulating of small droplet with radius of 2mm | liguifan | OpenFOAM Running, Solving & CFD | 5 | June 3, 2014 02:53 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 21:14 |