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

fvOptions is not working

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

Like Tree4Likes
  • 2 Post By Yann
  • 1 Post By Yann
  • 1 Post By nazmulislam

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2023, 08:46
Default fvOptions is not working
  #1
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
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
Attached Images
File Type: png oscillating flow.png (29.2 KB, 30 views)
File Type: png fvOptions.png (76.3 KB, 48 views)
nazmulislam is offline   Reply With Quote

Old   April 11, 2023, 04:33
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,026
Rep Power: 25
Yann will become famous soon enough
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
alexlupo and nazmulislam like this.
Yann is offline   Reply With Quote

Old   April 11, 2023, 06:44
Default
  #3
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Quote:
Originally Posted by Yann View Post
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 is offline   Reply With Quote

Old   April 13, 2023, 00:34
Default
  #4
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
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?
Attached Images
File Type: png fvModels.png (65.0 KB, 31 views)
File Type: png fatal error message.png (36.5 KB, 17 views)
nazmulislam is offline   Reply With Quote

Old   April 13, 2023, 04:17
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,026
Rep Power: 25
Yann will become famous soon enough
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 likes this.
Yann is offline   Reply With Quote

Old   April 13, 2023, 07:18
Default
  #6
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Quote:
Originally Posted by Yann View Post
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 is offline   Reply With Quote

Old   April 14, 2023, 03:29
Default
  #7
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
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
Attached Images
File Type: png fvModels.png (37.8 KB, 28 views)
nazmulislam is offline   Reply With Quote

Old   April 17, 2023, 05:11
Default
  #8
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,026
Rep Power: 25
Yann will become famous soon enough
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
Yann is offline   Reply With Quote

Old   April 19, 2023, 03:01
Default
  #9
Member
 
Nazmul Islam
Join Date: Feb 2023
Posts: 32
Rep Power: 3
nazmulislam is on a distinguished road
Quote:
Originally Posted by Yann View Post
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
Yann likes this.
nazmulislam is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Configuration of boundary conditions and fvOptions file Raza Javed OpenFOAM Running, Solving & CFD 16 May 3, 2019 17:35
Power and Enthalpy in fvOptions file Raza Javed OpenFOAM Running, Solving & CFD 1 April 26, 2019 11:03
fvOptions -call value from different region TobiF OpenFOAM Running, Solving & CFD 0 December 8, 2017 10:27
Processor 0 not working vishwesh OpenFOAM Running, Solving & CFD 0 November 17, 2017 04:35
DPM parallel is not working but serial is working johnwinter FLUENT 1 March 27, 2012 03:01


All times are GMT -4. The time now is 15:16.