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

Questions regarding scalar transport equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2014, 23:52
Default Questions regarding scalar transport equation
  #1
New Member
 
Join Date: Sep 2014
Posts: 15
Rep Power: 12
Franko is on a distinguished road
Hi!

My problem is simple scalar 1-D transport equation which have two conditions, one inlet BC and one initial condition:
dU/dt+dU/dx=0, 0 <= x <= 1, 0 <= t <= T
U(0,x)=f(x), 0 <= x <= 1
U(t,0)=g(t), 0 <= t <= T


Theoretically we can solve this equation using only these two conditions. But openFoam asks me to set outlet BC (where x=1). I can't do this because I want to solve the equation without this BC! So what should I set for the outlet boundary in 0/U "boundaryField"?
Franko is offline   Reply With Quote

Old   October 4, 2014, 21:19
Default
  #2
New Member
 
Join Date: Sep 2014
Posts: 15
Rep Power: 12
Franko is on a distinguished road
It looks like that I need advection outlet BC (=no-reflection BC). Is that true?
Franko is offline   Reply With Quote

Old   October 5, 2014, 06:07
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Franko and welcome to the forum!

I'll try to answer you with a rephrased problem description and respective questions.
Imagine:
  1. You're holding a piece of string at "U(0,x)=f(x)", namely at one end of the string;
  2. You know that you're going to move that end of the string with "U(t,0)=g(t)";
  3. You also know the properties of the string (viscosity/elasticity, etc...);
  4. And you also know how the string deforms when it's moved, i.e. how each molecule of the string reacts to its neighbouring molecules, namely "dU/dt+dU/dx=0".
Now you start moving the string around. Now answer me these questions:
  1. Where is the other end of the string?
  2. Where did the other end of the string initially at?
  3. Where is the the other end of the string at any point in time?
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   October 5, 2014, 08:46
Default
  #4
New Member
 
Join Date: Sep 2014
Posts: 15
Rep Power: 12
Franko is on a distinguished road
Wyldcat, thanks for your answer!

I want to say that I know not only piece of a string initially, I know all about the string initially because the other end is fixed at x=1. (the domain of my equation: 0 <= x <= 1 and function f(x) has the same domain of definition)

So the answer to all your questions above is "x=1".

Also I am a bit confused because in my tutorial words "string" and "string equations" usually referred to the equations with the second order derivatives (wave equations), but my equation "dU/dt+dU/dx=0" has only first order derivatives, it is simple "advection equation". Maybe we can call it a string, I don't know...
Franko is offline   Reply With Quote

Old   October 5, 2014, 09:57
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Franko,

I was using the "string" as a literal piece of string as an example, possibly affected by gravity. Essentially I was trying to visualize this problem as if it was a pendulum being grabbed at one end (where there is no weight) was being moved over time with "U(t,0)=g(t)".

Now that I think more about it, I guess I wasn't able to properly create a visual analogous example... should have thought right out in using a pendulum as the example.


Forgetting the visual example I was trying to think about, the conditions you're defining result in this:
  • The initial field is fully defined in function of "f(x)":
    Code:
    U(0,x)=f(x), 0 <= x <= 1
  • The inlet is fully defined for the whole time range:
    Code:
    U(t,0)=g(t), 0 <= t <= T
  • The outlet at "x=1" is undefined for most of the time span, except for "t=0".
Usually what is done in OpenFOAM cases is that the outlet is defined as being "zeroGradient", i.e.:
Code:
dU(t,1)/dx = 0
(if I'm not mistaken.. it might be "dU(t,1)/dt" ) in the sense that even if "U(t,1)" is a result of the defined conditions and equation, there must be some sort of constraint at this outlet, where the simplest is the derivative term being 0, hence the value at the outlet should be constant... at the very least, in comparison with the value next to it.

Either way, there is an example of this in the tutorial case "basic/scalarTransportFoam/pitzDaily". The only difference is that "g(t)" is always 10 for "U", and 1 for "T" (as in field, not time) in that example.


If we try to go back to the visual example I was trying to describe:
  • The end of the pendulum at "x=0" is always known;
  • The location of the whole string is know for "t=0";
  • The extremity of the pendulum that has the weight is at "x=1", known for its initial location for "t=0", but it's behaviour isn't fully known. There is no clear indication of either how much it weights or if there is gravity acting on it.
    • All that is (somewhat) known is that if the other end is pulled farther away than the string length allows, it will have to be pulled along for the ride.
... I didn't manage to give a good analogy

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   October 21, 2014, 17:54
Default
  #6
Senior Member
 
Yuehan
Join Date: Nov 2012
Posts: 142
Rep Power: 14
wc34071209 is on a distinguished road
Bruno, You are actually giving a good example.

If you decompose a 2nd order wave equation, you get two 1st order advection equations.

Mathematically speaking, he seems to want to solve an initial value problem, but OpenFOAM is designed to solve boundary value problems. However, if you want to solve an initial value problem, you must use at least a semi infinite domain. But he seems to only care about what is happening between 0 and 1, which makes me confused.

So my suggestion is that you make sure what kind of problem you want to solve in the first place.
wc34071209 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
Question about scalar transport osimonsimon OpenFOAM Running, Solving & CFD 33 August 21, 2020 11:45
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
UDF Transport equation for transition momentum thickness Reynolds number Wantami FLUENT 0 April 9, 2011 03:50
how solve a scalar equation with Fluent tomik FLUENT 0 January 5, 2006 07:38
transport equation for SGS scalar variance chinthakindi Main CFD Forum 0 April 27, 2004 10:26


All times are GMT -4. The time now is 12:57.