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

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

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 6, 2012, 03:04
Default 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
mechy is on a distinguished road
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::grad(U)& Uper
+ fvc::grad(Uper)& U
- fvc::laplacian(nu, Uper)
);

solve(UperEqn == -fvc::grad(pper));


but OF debug encounter bellow error for calculating
fvc::grad(U)& Uper and fvc::grad(Uper)& U



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
File Type: jpg perturb1.jpg (95.1 KB, 17 views)
mechy is offline   Reply With Quote

Old   March 6, 2012, 03:10
Default
  #2
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
grad(U)& Uper
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));
nimasam is offline   Reply With Quote

Old   March 6, 2012, 03:49
Default Dear nima
  #3
Senior Member
 
Join Date: Jun 2011
Posts: 141
Rep Power: 6
mechy is on a distinguished road
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
mechy is offline   Reply With Quote

Reply

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
double dot tensor product (double inner product) implementation yogzebul OpenFOAM Programming & Development 2 July 28, 2011 11:28


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