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

solve continiuty for velocity

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By FelixL

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 27, 2011, 13:04
Default solve continiuty for velocity
  #1
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16
linch is on a distinguished road
Hi Foamers,

in compressible solvers continuity is solved for density:
Code:
solve(fvm::ddt(rho) + fvc::div(phi));
with mass flux phi.

But how can I solve continuity for velocity?

I already tried to solve:
Code:
    fvScalarMatrix UEqn
    (
        fvc::ddt(rho)
      + fvm::div(rho,U)
    );
And the compiler returned an error:
Quote:
error: no matching function for call to ‘div(Foam::volScalarField&, Foam::volVectorField&)’
Then I tried: this one:
Code:
fvScalarMatrix UEqn
{
   fvc::ddt(rho)
+ fvm::div(fvc::interpolate(rho),U)
}
but then I got a type mismatch error:
Quote:
error: no match for ‘operator+’ in ‘Foam::fvc::ddt(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = double]() + Foam::fvm::div(const Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> >&, Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>](((Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&)(& U)))’
Code:
    fvScalarMatrix UEqn
    (
        fvc::ddt(rho)
      + fvm::div(rho,phi)
    );
->
Quote:
error: no matching function for call to ‘div(Foam::volScalarField&, Foam::surfaceScalarField&)’
Code:
fvScalarMatrix UEqn
    (
        fvc::ddt(rho)
      + fvm::div(fvc::interpolate(rho),phi)
    );
->
Quote:
error: no matching function for call to ‘div(Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> >, Foam::surfaceScalarField&)’
Code:
fvVectorMatrix UEqn
    (
        fvc::ddt(rho)
      + fvm::div(fvc::interpolate(rho),U)
    );
->
Quote:
error: no match for ‘operator+’ in ‘Foam::fvc::ddt(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = double]() + Foam::fvm::div(const Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> >&, Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>](((Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&)(& U)))’
I'm looking forward for an expert-answer

Best,
linch is offline   Reply With Quote

 

Tags
continuity equation, velocity field


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
Solve Flow or VOF simultaneously ? Ramsey FLUENT 1 February 16, 2011 13:16
Linearized NS euqations: how to solve them?(problem with Matrix operations..) matteoL OpenFOAM Running, Solving & CFD 0 November 18, 2009 06:58
Solve for two or more "Temperatures" Rui CFX 12 September 9, 2008 21:58
How FVM will solve shock problem? michael Main CFD Forum 4 June 13, 2007 09:07
How to solve another continuum and momentum eqn? west_wing FLUENT 0 August 25, 2003 10:00


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