# Including limiters in fvOptions

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 21, 2020, 06:29 Including limiters in fvOptions #1 New Member   Join Date: Jan 2020 Posts: 6 Rep Power: 6 Dear all, I'd like to know if there is a way to include limiters on equation variables such as p, U, etc. (max and min values) in the case of using SRFSimpleFoam, simpleFoam, etc. Thanks in advance, Lorenzo

 January 21, 2020, 13:54 #2 Senior Member   Lasse Brams Vinther Join Date: Oct 2015 Posts: 112 Rep Power: 10 Hello Lorenzo, You can limit the velocity, temperature and such in fvOptions such as the following: Code: ``` limitU { type limitVelocity; active yes; selectionMode all; max 100; }``` Or in fvSolution as the following with the pressure or density as well limited. Code: ```SIMPLE { nNonOrthogonalCorrectors 0; numberIterationsStator 1; numberIterationsRotor 1; UMax 500; pMin pMin [0 2 -2 0 0 0 0] -1000; pMax pMax [0 2 -2 0 0 0 0] 1000; }``` Best regards, Lasse The King, Gerhard, altinel and 1 others like this.

January 22, 2020, 10:58
#3
New Member

Join Date: Jan 2020
Posts: 6
Rep Power: 6
Quote:
 Originally Posted by Swagga5aur Hello Lorenzo, You can limit the velocity, temperature and such in fvOptions such as the following: Code: ``` limitU { type limitVelocity; active yes; selectionMode all; max 100; }``` Or in fvSolution as the following with the pressure or density as well limited. Code: ```SIMPLE { nNonOrthogonalCorrectors 0; numberIterationsStator 1; numberIterationsRotor 1; UMax 500; pMin pMin [0 2 -2 0 0 0 0] -1000; pMax pMax [0 2 -2 0 0 0 0] 1000; }``` Best regards, Lasse

Thanks a lot Lasse,
the limiter on velocity works for the case I'm running, but the limiter on pressure does not seem to be read by the code (I tried to put banana instead of a value for pMax and the solver [SRFSimpleFoam] didn't complain). Do you have some further suggestions on this aspect?

 January 22, 2020, 13:59 #4 Senior Member   Lasse Brams Vinther Join Date: Oct 2015 Posts: 112 Rep Power: 10 Hello Lorenzo, I may have been a bit too hasty regarding the pressure limiting, as it seems that incrompressible solvers does not read the limit specified in fvSolution as compressible solvers does in the pEqn. I'll make a test solver where this is included to be certain of the implementation. masterJames likes this.

January 22, 2020, 15:03
#5
Senior Member

Lasse Brams Vinther
Join Date: Oct 2015
Posts: 112
Rep Power: 10
Alright so I was unable to apply the fvSolution limiter as the units of the pMin/pMax is different as it does not include the density as the incompressible solver does in the pressure field.

I then just added a pMin, pMax to the transportProperties in a new solver called limitedSimpleFoam an example of this is attached to this post, and restricted in the pressure in pEqn with min max.

I'm not certain its possible to limit the pressure directly in fvSolution for incompressible solvers, I at least was unable to locate it in the source.

Regards,
Lasse
Attached Files
 limitedSimpleFoam.zip (2.5 KB, 92 views)

January 23, 2020, 06:18
#6
New Member

Join Date: Jan 2020
Posts: 6
Rep Power: 6
Quote:
 Originally Posted by Swagga5aur Alright so I was unable to apply the fvSolution limiter as the units of the pMin/pMax is different as it does not include the density as the incompressible solver does in the pressure field. I then just added a pMin, pMax to the transportProperties in a new solver called limitedSimpleFoam an example of this is attached to this post, and restricted in the pressure in pEqn with min max. I'm not certain its possible to limit the pressure directly in fvSolution for incompressible solvers, I at least was unable to locate it in the source. Hope its adequate. Regards, Lasse

Thanks a lot for the effort,
I'll try to include this feature in the SRFSimpleFoam solver too, to handle a case I'm currently running.