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

Equation for scalar source

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 15, 2005, 04:43
Default Halleluja! Another one saved
  #1
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 19
niklas will become famous soon enough
Halleluja!
Another one saved by the dimensionality check

As you can see from your error message you have incompatible dimensions.
fvm::ddt(scal) has 1/s, which means that all the other terms must have the same dimension.
However, your sv-term has
(1/m)*(m^2/s)^(.5) = s^-0.5, so you should check your terms, they are obviously incompatible,
or there is a dimension in w1.

N
niklas is offline   Reply With Quote

Old   September 15, 2005, 04:47
Default Dimension checking - does exac
  #2
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 8
grtabor is on a distinguished road
Dimension checking - does exactly what it says on the tin!

If your scal is dimensionless then when you take a time derivative you get something with dimensions
[0 0 -1 0 0 0 0]. On the rhs you took a square root. This is either wrong, or you need a prefactor to this term with the dimensions [0 0 -0.5 0 0 0 0] to be physically correct.

Gavin
grtabor is offline   Reply With Quote

Old   September 15, 2005, 06:04
Default Hi guys, Got that, and indee
  #3
Member
 
Radu Mustata
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 96
Rep Power: 8
r2d2 is on a distinguished road
Hi guys,
Got that, and indeed the w1 should have dimension of s^-0.5. Then how do I define w1 with the right dimension?
Thanks,
Radu
r2d2 is offline   Reply With Quote

Old   September 15, 2005, 06:17
Default something like this... dime
  #4
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 19
niklas will become famous soon enough
something like this...

dimensionedVector w1
(
"w1", dimensionSet(0,0,-0.5,0,0), vector(-1,1,-1)
);
niklas is offline   Reply With Quote

Old   September 15, 2005, 06:25
Default I've been trying to see how to
  #5
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 8
grtabor is on a distinguished road
I've been trying to see how to do this implicitly. The easiest way would be to do this:

solve
(
fvm::ddt(scal)
+ fvm::div(phi,scal)
- fvm::laplacian(sgsModel->nuEff(),scal)
== fvm::Sp(sv1/scal,scal)
);

A more elegant way would be to expand your term to get at least one involving (thing)*scal, and discretise that implicitly.

Gavin
grtabor is offline   Reply With Quote

Old   September 15, 2005, 06:27
Default Thanks Niklas, So far so goo
  #6
Member
 
Radu Mustata
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 96
Rep Power: 8
r2d2 is on a distinguished road
Thanks Niklas,
So far so good. Seems to work fine now. Of course this is just a small part of what I want to do. Will get back later, hopefuly with no so easy questions.
Radu
r2d2 is offline   Reply With Quote

Old   September 15, 2005, 06:31
Default Or use that... hope my math-sk
  #7
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 19
niklas will become famous soon enough
Or use that... hope my math-skills are all forgotten.
grad(a) dot V = div(aV) - a *div(V)

and since V is constant...
div(aV) = grad(a) dot V

hence,
fvc::grad(...) = div(...,scal)

Henry or Hrv will correct me if im wrong

N
niklas is offline   Reply With Quote

Old   September 15, 2005, 07:13
Default Actually, V is not constant, s
  #8
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 19
niklas will become famous soon enough
Actually, V is not constant, since nuEff is in there, V=nuEff*w1, so you cant drop that term.

It'll be something like
fvc::grad(...) & w1 = fvm::div(..., scal) -fvm::Sp(div(V), scal)

Anyway, im leaving the details to you.
You do the math. (hehe, I love to say that)

N
niklas 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
Scalar Equation source term Merck CFX 0 May 11, 2007 05:30
UDS - scalar equation tomik FLUENT 0 May 17, 2006 04:17
The source of user scalar equation rambol CFX 3 November 14, 2002 08:37
scalar equation not converging hennie CD-adapco 2 July 24, 2002 04:06
scalar equation Arturo Ortiz FLUENT 3 October 8, 2000 12:36


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