CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   blockCoupledScalarTransport solver (http://www.cfd-online.com/Forums/openfoam-programming-development/131923-blockcoupledscalartransport-solver.html)

alisina-s March 22, 2014 15:54

blockCoupledScalarTransport solver
 
Hi everybody,
I am trying to solve 2 transport equations that are coupled each other and I modified blockCoupledScalarTransport.C in the way of my equations and the same as mentioned here
http://sourceforge.net/p/openfoam-ex...TransportFoam/
I added all this files with makefile in my directory but when I want to compile my solver(the modified version of blockCoupledScalarTransport) I have this:
In file included from tensor2Field.H:40:0,
from tensor2Field.C:27:
tensor2.H:39:21: fatal error: TensorN.H: No such file or directory
compilation terminated.
Does anybody knows what is this and what should I do?
thanks in advance

wyldckat March 22, 2014 18:23

Greetings alisina-s and welcome to the forum!

I'm not sure I understand your question. Are you trying to build this solver with or without OpenFOAM?

Best regards,
Bruno

alisina-s March 22, 2014 18:39

thanks,
I am trying to use this solver by a little bit modification int the way of my equations in openfoam.

wyldckat March 22, 2014 18:53

Quote:

Originally Posted by alisina-s (Post 481522)
thanks,
I am trying to use this solver by a little bit modification int the way of my equations in openfoam.

OK, then there are two important details that you should keep in mind:
  1. When creating your own customized solver, follow the same strategy outlined on this tutorial: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam
  2. This particular solver you're using, namely "blockCoupledScalarTransport", should be used only with FOAM-Extend 3.0.
    In other words, do not try to use it in OpenFOAM 2.3 or 2.2 or older, as it is not compatible. The reason is simple: equation coupling in FOAM-Extend is done differently from OpenFOAM. More specifically, I'm not sure if OpenFOAM even has this feature.

alisina-s March 23, 2014 06:11

thanks bruno for your answer
I knew about how to make our own solver but I did not know that I have to use this specific version of openfoam you mentioned.my equations are like below
A) dT/dt +d/dx(UT)=0
B) dT/dt +d/dx(Uk)=0
dk/dt +d/dx(UT)=0
and k is another quantity that want to be transfered like T.
I know these are not notation of openfoam in writing the equations I just want to mention my equations.
do you have any other suggestion for this except using "blockCoupledScalarTransport"?

regards,
sina

wyldckat March 23, 2014 13:28

Unfortunately, I don't know the answer.
But I do have the vague idea that this has been asked here in the forum a few times in the past...

Good luck! Best regards,
Bruno

pweber March 24, 2014 06:45

Hello sina,

I think you do not need a block coupled solver since your equations decouple.

Quote:

Originally Posted by alisina-s (Post 481560)
my equations are like below
A) dT/dt +d/dx(UT)=0
B) dT/dt +d/dx(Uk)=0
C) dk/dt +d/dx(UT)=0

Eq. A) just uses T, eq. C) becomes

Code:

0 = dk/dt + d/dx(UT)
  = dk/dt - dT/dt
  = dk/dt + d/dx(Uk)

by first using eq. A) and then eq. B). Thus you have

Code:

dT/dt + d/dx(UT) = 0
dk/dt + d/dx(Uk) = 0

Best,
Paul

alisina-s March 27, 2014 12:47

Quote:

Originally Posted by pweber (Post 481741)
Hello sina,

I think you do not need a block coupled solver since your equations decouple.



Eq. A) just uses T, eq. C) becomes

Code:

0 = dk/dt + d/dx(UT)
  = dk/dt - dT/dt
  = dk/dt + d/dx(Uk)

by first using eq. A) and then eq. B). Thus you have

Code:

dT/dt + d/dx(UT) = 0
dk/dt + d/dx(Uk) = 0

Best,
Paul

thanks paul
but what if I wanted to solve these two quantity together,I mean if I want k be under effect of Quantity T,Do you have any idea?

pweber April 3, 2014 07:44

Dear Sina,

the nature of your equations is such that T and k decouple, i.e. they have no influence on each other. Reformulations of the system and it's simulation will never show dependence of T and k on each other, simply because it does not exist. However, if the underlying physics modeled by your system indeed imply a coupling, the only way to get it included is to redo the modeling in a proper way and thus derive a new, then coupled, equation system.

In that case, the coupled system can be written as
Code:

dT/dt + d/dx(UT) = f(k)
dk/dt + d/dx(Uk) = g(T)

where f and g are functions (in general, operators) depending on k and T, respectively. Having that, proceed to define non-zero parts of f and g which you would like to be treated implicitly. Then you are prepared to make use of block coupled simulation techniques, but as long as you use the model given to us here, you will never see any coupling of the two variables.

Best,
Paul

alisina-s April 3, 2014 11:12

Quote:

Originally Posted by pweber (Post 483657)
Dear Sina,

the nature of your equations is such that T and k decouple, i.e. they have no influence on each other. Reformulations of the system and it's simulation will never show dependence of T and k on each other, simply because it does not exist. However, if the underlying physics modeled by your system indeed imply a coupling, the only way to get it included is to redo the modeling in a proper way and thus derive a new, then coupled, equation system.

In that case, the coupled system can be written as
Code:

dT/dt + d/dx(UT) = f(k)
dk/dt + d/dx(Uk) = g(T)

where f and g are functions (in general, operators) depending on k and T, respectively. Having that, proceed to define non-zero parts of f and g which you would like to be treated implicitly. Then you are prepared to make use of block coupled simulation techniques, but as long as you use the model given to us here, you will never see any coupling of the two variables.

Best,
Paul

let consider I have just
dT/dt + d/dx(Uk) = 0
dk/dt + d/dx(UT) = 0
how can I solve this?
I was thinking to define a vector a(T k2) and a'(k -T) and then solve da/dt + da'/dx = 0
do you know how can I implement this in openfoam?
Thanks in advance,
Sina


All times are GMT -4. The time now is 06:52.