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

How to add this term to openfoam solver

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

Like Tree1Likes
  • 1 Post By ssss

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2015, 13:59
Question How can i add this term to icoFoam
  #1
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
Hello friends,

how can i add the right hand side equation to icoFoam???




Last edited by rapierrz; February 26, 2015 at 04:11.
rapierrz is offline   Reply With Quote

Old   February 26, 2015, 19:05
Default
  #2
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
If this is the NS diffusion term its already there.
kmooney is offline   Reply With Quote

Old   February 27, 2015, 01:16
Unhappy
  #3
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
yes.This is diffusion term but usually in solvers there is only

div(grad(U)) and i want to know how to write

div(grad(U)+grad(U).tanspose)

I write div(nu,symm(fvc::grad(U))) and Error was :

no matching function for call to ‘div(Foam::volScalarField&...
rapierrz is offline   Reply With Quote

Old   February 27, 2015, 03:52
Default
  #4
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13
ssss is on a distinguished road
I suppose you are using non constant viscosity so:

Code:
fvc::grad(mu)&fvc::grad(U)+fvc::laplacian(mu,U)
You should change fvc for fvm if you want to use a more implicit calculation in the momentumPredictor.

I recommend yo to take a look at the solver: nonNewtonianIcoFoam
ssss is offline   Reply With Quote

Old   February 27, 2015, 05:20
Default
  #5
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
thank you ssss,

my problem is that how i can define div(mu,grad(U).transpose)
rapierrz is offline   Reply With Quote

Old   February 27, 2015, 05:23
Default
  #6
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13
ssss is on a distinguished road
Code:
fvc::grad(U).T()
ssss is offline   Reply With Quote

Old   February 27, 2015, 05:35
Default
  #7
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
When i use of fvc::grad(U).T() error is :

has no member named ‘T’
rapierrz is offline   Reply With Quote

Old   February 27, 2015, 05:37
Default
  #8
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13
ssss is on a distinguished road
Then try:

Code:
T(fvc::grad(U))
ssss is offline   Reply With Quote

Old   February 27, 2015, 05:47
Default
  #9
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
it does not work

my openfoam version is 2.2.1
rapierrz is offline   Reply With Quote

Old   February 27, 2015, 08:13
Default
  #10
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13
ssss is on a distinguished road
Well then last chance:

Code:
fvc::grad(U)().T()
It compiles for me
rapierrz likes this.
ssss is offline   Reply With Quote

Old   February 28, 2015, 12:30
Default
  #11
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
Thank you very much ssss

ut's working correctly.

you was great help for me.
rapierrz 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
Solve poisson equation just add a source term nandiganavishal OpenFOAM Running, Solving & CFD 18 November 14, 2022 09:12
Can't get data from OpenFoam to external solver using externalCoupled perry OpenFOAM Running, Solving & CFD 4 May 26, 2014 08:09
Building a custom solver on OpenFOAM 2.0 wschosta OpenFOAM Programming & Development 1 July 8, 2011 15:07
Add time dependent Source term libe OpenFOAM Running, Solving & CFD 13 September 23, 2010 09:12
OpenFOAM Training in Europe and USA hjasak OpenFOAM 0 August 8, 2008 05:33


All times are GMT -4. The time now is 11:55.