CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   fvOptions - fix cellValues in cellZone with different values (https://www.cfd-online.com/Forums/openfoam-pre-processing/189762-fvoptions-fix-cellvalues-cellzone-different-values.html)

Tobi June 26, 2017 11:48

fvOptions - fix cellValues in cellZone with different values
 
Hi all,

just out of curiosity. Is there a way in fvOptions to fix the values at given cells (cellZone) with different values? Using scalarFixedValueConstraint enables this possibility for a cellZone, but I only can add one value which will be used for all cells. In my case I have a cellZone (arbitrary cells) which have different values. I never worked with fvOptions too much so maybe one of you knows it. If there is not such an option I might make a patch or do a dirty solution with hard-coding and using setValues for the matrix.

Tobi July 11, 2017 10:46

Short info. Right now it is not working. I guess it is based on the fact that the matrix should be first constructed completely and then we should manipulate it. Doing the same things after constructing the matrix works fine and as expected. Thus, I decided to make a new solver.

Thecomebackkid November 6, 2018 04:27

Is this also true of blue-cfd 2017 pls? I am trying to use fvOptions to make certain cellZones zero pressure and velocity within a MRF.

Tobi November 6, 2018 06:26

As I pointed out, I wanted to set different values for a cellZone (cellSet). So in your case it should work without problems.

Thecomebackkid November 6, 2018 06:45

thanks for the confirmation.

sumitverma5977 April 10, 2021 19:13

I am solving incompressible flow problem using pimpleFoam solver and my computational domain is a cylinder.... I have created a cellset consisting of control volume cells at the bottom periphery(i.e. cells that lie at the circumference) of the cylinder.... I wanted to fix the pressure values of those cells(or the cellset/cellZone) to 0 value throughout the simulation time.... Looking for someways to tackle the problem, i came across "scalarFixedValueConstraint" utility and using that i tries to fix the cellzZone pressure to a 0 value but it did not help..... Later i tried looking at the source code of solver "pimpleFoam"... I found that the constructor for momentum equation is created in such a way that the right hand side comprises of "fvOptions (U)"..... Although i am not sure.... As i am looking to constrain pressure values... Should it be modified to "fvOptions (p)"? Or is there any other way to fix cellzZone pressure values to 0? I would really appreciate the help if somebody would provide hints or point to a helpful resource relating to the problem at hand.... Thanks

mikulo July 11, 2022 04:45

Hello,

What you are trying to do is impossible. fvOptions functionality takes an argument for U and H only. However, you can make your own class but it would be so tedious. I suggest you make a code in the solver, or make a cellset and then from this cellset modify the pressure. But i don't understand why it didn't work out for you in scalarFixedValueConstraint.

Regards,
Mike


All times are GMT -4. The time now is 14:23.