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

Hyper viscosity model

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 25, 2010, 20:30
Default Hyper viscosity model
  #1
Member
 
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 8
Pascal_doran is on a distinguished road
Hi all,

I would like to implement an hyper viscosity model which mean that I need to add the following term in the momentum equation :
-nuHV*d⁴U/dx⁴ or nuHV*laplacian(laplacian(U))
where nuHV is the hyper viscosity coefficient. I try this:
Code:
        volVectorField lap = fvc::laplacian(nuHV/nuHV, U);
 
        fvVectorMatrix UEqn
        (
            fvm::ddt(U)
          + fvm::div(phi, U)
          - fvm::laplacian(nu, U)
          + fvm::laplacian(nuHV, lap)
        );
 
        solve(UEqn == -fvc::grad(p));
it compiled but I got this error message after starting the simulation:
Code:
[1] --> FOAM FATAL ERROR: 
[1] incompatible fields for operation 
    [U] + [((nuHV|nuHV)*laplacian(U))]
Note that I never wish to add U with ((nuHV|nuHV)*laplacian(U)) ...

Then I tried this:
Code:
        fvVectorMatrix UEqn
        (
            fvm::ddt(U)
          + fvm::div(phi, U)
          - fvm::laplacian(nu, U - fvm::laplacian(nuHV/nu, lap))
        );
 
        solve(UEqn == -fvc::grad(p));
And it didn't compile. What I should try?
Thank you,

Pascal

Last edited by Pascal_doran; November 27, 2010 at 15:45.
Pascal_doran is offline   Reply With Quote

Old   November 26, 2010, 04:20
Default
  #2
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 8
Chris Lucas is on a distinguished road
Hi,

about the second source code you tried:
You want to solve the equation for U (what you do in the first two terms), but in the "new" term, you say that you want to solve the equation for "U-fvm::laplacian(...)".

About the first source code you tried:
the same error as above, you want to solve the equation for U, not lap.

Try to exchange the fvm and fvc for the lap equation and the laplacian term of the first source code

Regards,
Christian
Chris Lucas is offline   Reply With Quote

Old   December 1, 2010, 20:51
Default
  #3
Member
 
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 8
Pascal_doran is on a distinguished road
Thank you Christian,

It works when I tried this:
Code:
        volVectorField lap = fvc::laplacian(nuHV/nuHV, U);
 
        fvVectorMatrix UEqn
        (
            fvm::ddt(U)
          + fvm::div(phi, U)
          - fvm::laplacian(nu, U)
          + fvc::laplacian(nuHV, lap)
        );
 
        solve(UEqn == -fvc::grad(p));
but what I should do if I want calculate it implicitly? Because this didn't work...:
Code:
        volVectorField lap = fvm::laplacian(nuHV/nuHV, U);
 
        fvVectorMatrix UEqn
        (
            fvm::ddt(U)
          + fvm::div(phi, U)
          - fvm::laplacian(nu, U)
          + fvm::laplacian(nuHV, lap)
        );
 
        solve(UEqn == -fvc::grad(p));
Should I implement it myself or there's an easier way to do it?

Regards,
Pascal
Pascal_doran is offline   Reply With Quote

Reply

Tags
hyper viscosity

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementing new viscosity model prjohnston OpenFOAM Running, Solving & CFD 6 July 3, 2015 04:26
Wrong calculation of nut in the kOmegaSST turbulence model FelixL OpenFOAM Bugs 27 March 27, 2012 09:02
Yielding viscosity for Herschel Bulkley model Godwin FLUENT 1 December 12, 2011 06:42
Power Law Viscosity Model cpplabs OpenFOAM Running, Solving & CFD 1 February 13, 2008 09:09
Casson Viscosity model as one user define function Zahra Rahmdel FLUENT 0 November 6, 2004 06:53


All times are GMT -4. The time now is 09:00.