CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Fix velocity value (https://www.cfd-online.com/Forums/openfoam-programming-development/136092-fix-velocity-value.html)

mike_ May 22, 2014 08:52

Fix velocity value
 
Hello to the OpenFOAM community.

I'm trying to develop a code to simulate wind turbine without using dynamic mesh.
In my domain i haven't the mesh of the turbine, i use a cube mesh i calculate the forces and applying that in the right point.

I need to fix the velocity value in some point of the domain.

In this point i want to fix the velocity without solving the U equation and i'm not sure that it 's possibile without drawing the geometry in the mesh.

How can i set the value of the velocity?

Thanks, :)

aerospaceman June 15, 2018 06:24

Did you find a solution/workaround for this? If so, could you please share it?

hyFoam June 17, 2018 05:09

Hi Mike,


Please have a look here, lines 18 to 61:
https://github.com/vincentcasseau/hy...vEqnInviscid.H

Once you've created your fvMatrix, you can use:

Code:

my_fvMatrix.setValues(removedCellsFromMatrix, valuesToImpose);

where the arguments are defined as follows:



Code:

DynamicList<label> removedCellsFromMatrix;
DynamicList<scalar> valuesToImpose;


Thanks,

Vincent


All times are GMT -4. The time now is 07:37.