CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User 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 Search this Thread 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: 163
Rep Power: 14
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, 91 views)
mechy is offline   Reply With Quote

Old   March 6, 2012, 03:10
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
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: 163
Rep Power: 14
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

Old   February 24, 2023, 12:17
Default
  #4
New Member
 
shouvik ghorui
Join Date: Oct 2019
Posts: 15
Rep Power: 6
shouvik ghorui is on a distinguished road
Have you found any suitable solution ?
shouvik ghorui 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
double dot tensor product (double inner product) implementation yogzebul OpenFOAM Programming & Development 2 July 28, 2011 12:28


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