# how can I do dot product of U and fvc::grad(U) where U is an volVectorFiled ?

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

March 6, 2012, 03:04
how can I do dot product of U and fvc::grad(U) where U is an volVectorFiled ?
#1
Senior Member

Join Date: Jun 2011
Posts: 141
Rep Power: 6
Hi All
I want to solve perturbation equation with OF. I attached these equations.
but I don't know how to calculate the convection term. I used the bellow equation

fvVectorMatrix UperEqn
(
fvm::ddt(Uper)
- fvc::laplacian(nu, Uper)
);

but OF debug encounter bellow error for calculating

error: no match for ‘operator+’ in ‘Foam::fvm::ddt(Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>]() + Foam::fvc::grad(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>]()’

I would be very appreciative if someone could point me in the right direction to get this model running.
Attached Images
 perturb1.jpg (95.1 KB, 17 views)

March 6, 2012, 03:10
#2
Senior Member

Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
grad(Uper)& U =div (UUper)

so
Quote:
 fvVectorMatrix UperEqn ( fvm::ddt(Uper) + fvm::div(phi,Uper) + fvm::laplacian(nu, Uper) ); then solve(UperEqn == -fvc::grad(pper));

 March 6, 2012, 03:49 Dear nima #3 Senior Member   Join Date: Jun 2011 Posts: 141 Rep Power: 6 since I want to remove the solving algebraic equation, I should calculate the derivative terms (like grad and laplacian) as an explicit fvc:: class please see the attachment about perturbation equations and tell me how I can solve these equation with an fvc:: for all derivative and fvm:: for ddt() in this equations U is defined and uper is undefined I want to calculate all derivative in the momentum equation with explicit manner except ddt(). Best Regards

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post yogzebul OpenFOAM Programming & Development 2 July 28, 2011 11:28

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

 Contact Us - CFD Online - Top