CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

No limitScalar in fvOptions? Only limitTemperature

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By HPE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2020, 18:05
Question No limitScalar in fvOptions? Only limitTemperature
  #1
Member
 
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 7
superkelle is on a distinguished road
Hi I wonder why there is only a very restricted limitTemperature option in fvOptions, and not a very gerneral limitScalar:


Code:
limitT
    {
        type            limitTemperature;
        active          yes;

        selectionMode   all;
        min             200;
        max             500;
        phase           gas; // optional
    }

I know that it applied on the "he" field of basicThermo, so not directly on a scalarField.

I also know that it is not hard to hard code it in a solver:


Code:
fieldX.max(minValue);
fieldX.min(maxValue);
but I would like to do it just with something like:


Code:
fvOptions.correct(fieldX);

and a fvOptions entry like:


Code:
limitMyScalar
    {
        type            limitScalar;
        active          yes;
        
        field                sigma; 
        selectionMode  cellZone; //all
        cellZone          porosity;   
        min                 200;
        max                500;
 
    }
I also already tried to edit the limitTemperature files in that way, but since my genaral C++ knowledge specialy templetisation, class and type understanding is not so sophisticated I got stuck at how I could implement it to a specific field that is mentioned in the dictionary. And later on the implementation / linkage in OF fvOptions, so I could use it in any OF Code.


Huge thanks if someone gives me some advice.
superkelle is offline   Reply With Quote

Old   May 31, 2020, 16:24
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Hi,

- If you would like to have a general limiter for fields, you can use limitFields function object, instead.

Hope it helps.
superkelle and shinigamirem like this.
HPE is offline   Reply With Quote

Old   May 31, 2020, 20:38
Default
  #3
Member
 
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 7
superkelle is on a distinguished road
Yes that should be what I like was looking for, thanks. Sometimes I wonder about implemented functionalities, that are somehow redundant. I am also motivated to implement it in fvOptions, for learning purpose and for the fact that it would nice to have it all in one place.
superkelle is offline   Reply With Quote

Reply

Tags
fvoptions, limits


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fvOptions limitTemperature crashing in compressibleInterFoam JM27 OpenFOAM Running, Solving & CFD 38 November 29, 2023 04:55
fvOptions: temperatureLimitsConstraint or limitTemperature not working on V3.0+ derekm OpenFOAM Running, Solving & CFD 6 February 1, 2021 02:16
Configuration of boundary conditions and fvOptions file Raza Javed OpenFOAM Running, Solving & CFD 16 May 3, 2019 17:35
topoSet/setSet and fvOptions pod OpenFOAM Running, Solving & CFD 5 April 30, 2019 06:41
twoPhaseEulerFoam + fvOptions limitTemperature hanness OpenFOAM Running, Solving & CFD 5 July 19, 2018 09:53


All times are GMT -4. The time now is 05:12.