CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   fvOptions is not working (https://www.cfd-online.com/Forums/openfoam-solving/248905-fvoptions-not-working.html)

nazmulislam April 9, 2023 07:46

fvOptions is not working
 
2 Attachment(s)
Hi,

I am trying to observe unsteady, laminar and incompressible flow through an axisymmetric periodic tube. I am using periodic boundary conditions (cyclicAMI) at the inlet and outlet. I am using OpenFoam Version10.

I would like to create an oscillatory flow using sinusoidal time varying functions in fvOptions. I have created the fvOptions file as in the attachment and put it in the system folder. However, it is not working.

I appreciate your kind suggestion in this regards.
Cheers

Yann April 11, 2023 03:33

Hello,

I think there are at least 2 problems in your simulation:
  1. uniformFixedValue is a boundary condition. It is meant to be used on a patch and defined in the 0 directory, not in fvOptions.
  2. I think fvOptions has been replaced by fvModels in OpenFOAM 10

Have a look at the models available with fvModels which might fit what you are trying to do.
accelerationSource sounds like a good option: https://github.com/OpenFOAM/OpenFOAM...rationSource.H

Cheers,
Yann

nazmulislam April 11, 2023 05:44

Quote:

Originally Posted by Yann (Post 847937)
Hello,

I think there are at least 2 problems in your simulation:
  1. uniformFixedValue is a boundary condition. It is meant to be used on a patch and defined in the 0 directory, not in fvOptions.
  2. I think fvOptions has been replaced by fvModels in OpenFOAM 10

Have a look at the models available with fvModels which might fit what you are trying to do.
accelerationSource sounds like a good option: https://github.com/OpenFOAM/OpenFOAM...rationSource.H

Cheers,
Yann


Hi Yann,


Many thanks for your kind response and for making clear about uniformFixedValue and fvOptions.



I will follow your direction and will see whether I get my desired flow using accelerationSource.


Cheers

nazmulislam April 12, 2023 23:34

2 Attachment(s)
Hi Yann,


I am trying to run the solver pimplefoam with accelerationSource. I have prepared the fvModels file as you can see in the attachment and put it in the constant folder.


However, I am getting the fatal error as you see in the attachemnt while I am running the solver.



Could you please suggest me in this regard?

Yann April 13, 2023 03:17

Hello,

There is a semicolon missing at the end of the "version" line, which prevents OpenFOAM to properly read the next line (format).
You can remove the version line which shouldn't be mandatory anymore in OpenFOAM-10:

Code:

FoamFile
{
    format      ascii;
    class      dictionary;
    location    "constant";
    object      fvModels;
}

Regards,
Yann

nazmulislam April 13, 2023 06:18

Quote:

Originally Posted by Yann (Post 848078)
Hello,

There is a semicolon missing at the end of the "version" line, which prevents OpenFOAM to properly read the next line (format).
You can remove the version line which shouldn't be mandatory anymore in OpenFOAM-10:

Code:

FoamFile
{
    format      ascii;
    class      dictionary;
    location    "constant";
    object      fvModels;
}

Regards,
Yann




Hi Yann,


Many thanks for identifying the problem.
It is working now.


Cheers,
Nazmul

nazmulislam April 14, 2023 02:29

1 Attachment(s)
Hi Yann,


I have tried to implement the accelerationSource along with sine function (instead of halfCosineRamp function) to make sinusoidally varying oscillating flow. However, it seems to me that it is not working as I expect, that is, it is not creating sinusoidally oscillating flow. Please see the fvModels in the attachment.



I am not clear about the "value" which has been taken as (-2.572 0 0) in the fvModels file.


Could you please give me the idea about this "value" and why it is not creating sinusoidally oscillating flow?


I really appreciate your kind cooperation in this regard.


Cheers,
Nazmul

Yann April 17, 2023 04:11

Hello Nazmul,

I never used accelerationSource so I don't know how it works exactly.
Since there is a line "velocity scale;", I guess the sine function should be used to scale the velocity set in value.

Regards,
Yann

nazmulislam April 19, 2023 02:01

Quote:

Originally Posted by Yann (Post 848275)
Hello Nazmul,

I never used accelerationSource so I don't know how it works exactly.
Since there is a line "velocity scale;", I guess the sine function should be used to scale the velocity set in value.

Regards,
Yann


Hello Yann,


Thanks for your explanation. I was using the solver pimpleFoam in the tutorial plannarPoiseuile which was making problem to produce sinusoidally oscillating flow. Now, I am using the solver pimpleFoam with the tutorial pitzDailyPulse and using fvModels file in the constant folder. And I am getting now sinusoidally oscillating flow.



However, still I am struggling to understand the underlying principle how it works. It says in accelerationSource.H file that "This fvModel applies an explicit acceleration force to components of the velocity field." So, it seems to this fvModels accelerate or deaccelerate the velocity components by adding as a source term to the existing (velocity at previous time step) velocity.


However, many thanks for your valuable suggestion which help to produce oscillatory flow.


Cheers,
Nazmul


All times are GMT -4. The time now is 11:42.