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

Adding an implicit gradient term

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Santiago

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 5, 2022, 08:19
Default Adding an implicit gradient term
  #1
Member
 
Uttam
Join Date: May 2020
Location: Southampton, United Kingdom
Posts: 34
Rep Power: 5
openfoam_aero is on a distinguished road
Dear FOAMers,

I have a question regarding the implicit gradient.

Here is my system of equations that I wish to solve
Screenshot from 2022-07-05 17-42-49.png

I have the solve for u^dagger and the quantity \Tilde{u} is known.

I am doing this using a modified SIMPLE algorithm (by playing around with the simpleFoam solver).

Here is the code that I have implemented

Code:
fvVectorMatrix UEqn
	(
                 //Laplacian term 4th term from left on the L.H.S of the equation 1
                 - (fvm::laplacian(nu,UDagger)) 
                 
                 //1st term from left on the L.H.S. of the equation 1
                 - fvm::div(phi, UDagger) + fvm::SuSp(fvc::div(phi), UDagger) 
                 
                 //2nd term from left on the L.H.S of the equation 1
                 + (UDagger & T(fvc::grad(U1)))  
	
	);
My question is, is the term
Screenshot from 2022-07-05 17-47-42.png

to be treated implicitly or explicitly? If it has to be treated implicity, how do I make a conversion just the way I did for the second term in fvVectorMatrix?
__________________
Best Regards
Uttam

-----------------------------------------------------------------

“When everything seem to be going against you, remember that the airplane takes off against the wind, not with it.” – Henry Ford.
openfoam_aero is offline   Reply With Quote

Old   July 5, 2022, 10:37
Default
  #2
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by openfoam_aero View Post
My question is, is the term
Attachment 90589

to be treated implicitly or explicitly?
You can write that term as div(U*U), then you dont have to deal with "implicit gradients" which, BTW, produce matrices that cannot be inverted.
openfoam_aero likes this.
Santiago is offline   Reply With Quote

Old   July 5, 2022, 10:42
Default
  #3
Member
 
Uttam
Join Date: May 2020
Location: Southampton, United Kingdom
Posts: 34
Rep Power: 5
openfoam_aero is on a distinguished road
Quote:
Originally Posted by Santiago View Post
You can write that term as div(U*U), then you dont have to deal with "implicit gradients" which, BTW, produce matrices that cannot be inverted.
Thank you very much for your suggestion Satiago.

But please help me understand this a little better. The term is u.grad(udagger)^T

How is this converted into div(U*U)? I would have to use fvm::div(flux, unknown) in that case but I am not sure if that is equivalent to the term u.grad(udagger)^T
What do you think?
__________________
Best Regards
Uttam

-----------------------------------------------------------------

“When everything seem to be going against you, remember that the airplane takes off against the wind, not with it.” – Henry Ford.
openfoam_aero is offline   Reply With Quote

Reply


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
Expanding an Implicit Scalar Source term to a Vector or Tensor ScalarVectorTensor OpenFOAM Running, Solving & CFD 1 October 18, 2023 02:31
pisoFOAM (LES) - internal pipe flow - convergence gu1 OpenFOAM Running, Solving & CFD 0 January 11, 2018 16:39
Problem adding a source term in interfoam's alphaEqn.H Quentin OpenFOAM Running, Solving & CFD 1 July 30, 2014 05:33
temperature gradient source term in uds cfd_mech FLUENT 0 July 27, 2014 04:55
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45


All times are GMT -4. The time now is 17:43.