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

explicit calculations in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ChrisA

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 16, 2014, 13:24
Default explicit calculations in OpenFOAM
  #1
ooo
Member
 
Join Date: Feb 2012
Posts: 49
Rep Power: 14
ooo is on a distinguished road
I'm going to implement the following equation ( from a runge kutta step) in OpenFOAM.
I'm not using the time descritizations of OpenFOAM, therefore i have problem to solve this, Im not sure whether this would be the correct form of implementation or not.
U* and laplacian(U*) in the LHS are unknown, and all of the terms in RHS are known.

solve(fvc::laplacian(nu,Unew) - Unew/(alpha*runTime.deltaTValue()) = (-1./alpha)*(U/runTime.deltaTValue() + f) + fvc::laplacian(nu,UOld))

Does this equation solves Unew same as the equation attached?
I would appreciate any suggestion.
Attached Images
File Type: jpg HelmholtzEquation.jpg (8.6 KB, 47 views)

Last edited by ooo; February 20, 2014 at 12:50.
ooo is offline   Reply With Quote

Old   February 20, 2014, 13:24
Default
  #2
ooo
Member
 
Join Date: Feb 2012
Posts: 49
Rep Power: 14
ooo is on a distinguished road
I would like to simplify my question and would appreciate any idea:
How to solve this equation where U* is unknown and U is a known volVectorField :
Laplacian(nu,U*) + U* = Laplacian(nu,U)

I get many errors regarding the solve function if i write like this :

solve (fvc::laplacian(nu,Unew) + Unew == fvc::laplacian(nu,U) )

Last edited by ooo; February 20, 2014 at 14:46.
ooo is offline   Reply With Quote

Old   February 20, 2014, 19:57
Default
  #3
Member
 
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 14
ChrisA is on a distinguished road
I'm only marginal in my understanding of how the differential stuff sets up in OF so someone can feel free to correct me... but I believe by using fvc on all the terms you're not giving solve anything to solve for? As far as I know fvc simply returns a value. Presumably Unew is also initialized as a value therefore all you have on either side of your equation is value == value, which obviously isn't going to solve. I'm thinking if you were to use fvm on the Unew laplacian and somehow include your 2nd term, Unew, into the equation as an implicit term... then solve, you'd probably be successful. There should be a way to put Unew in there I'm just not sure what as I've never had the need to look it up.
ooo likes this.
ChrisA is offline   Reply With Quote

Old   February 22, 2014, 08:04
Default
  #4
ooo
Member
 
Join Date: Feb 2012
Posts: 49
Rep Power: 14
ooo is on a distinguished road
Quote:
Originally Posted by ChrisA View Post
I'm only marginal in my understanding of how the differential stuff sets up in OF so someone can feel free to correct me... but I believe by using fvc on all the terms you're not giving solve anything to solve for? As far as I know fvc simply returns a value. Presumably Unew is also initialized as a value therefore all you have on either side of your equation is value == value, which obviously isn't going to solve. I'm thinking if you were to use fvm on the Unew laplacian and somehow include your 2nd term, Unew, into the equation as an implicit term... then solve, you'd probably be successful. There should be a way to put Unew in there I'm just not sure what as I've never had the need to look it up.
Thank you very much for your response.
I would appreciate also if you tell me your idea about this, using fvm::Sp(1,Unew) for including Unew in LHS...

solve (fvm::laplacian(nu,Unew) + fvm::Sp(1,Unew) == fvc::laplacian(nu,U) )
ooo 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
OpenFOAM 1.5.x package - CentOS 5.3 x86_64 linnemann OpenFOAM Installation 7 July 30, 2009 04:14
OpenFOAM Install problem masb OpenFOAM 3 May 25, 2009 12:32
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25
The OpenFOAM extensions project mbeaudoin OpenFOAM 16 October 9, 2007 10:33
OpenFOAM Training and Workshop Hrvoje Jasak Main CFD Forum 0 October 7, 2005 08:14


All times are GMT -4. The time now is 18:47.