
[Sponsors] 
January 8, 2008, 14:00 
Hi to evryone!
I'm a complete

#1 
Senior Member

Hi to evryone!
I'm a complete beginner in openFOAM (I began readin the manuals since yesterday!!), and I'm intrested to build a model that, given a value of a passive scalar, transports it downstream with a convection speed that I have to read from a CFD simulation done before. The particularity is that I need to modify the transported scalar at each timestep and use this new value to calculate the new transported value. It is possible in openFOAM?? 

January 22, 2008, 23:01 
Ivan, start by studying some o

#2 
Member
David P. Schmidt
Join Date: Mar 2009
Posts: 70
Rep Power: 8 
Ivan, start by studying some of the utilities that loop over all existing output and calculation something from them (such as magU). You can use this as a starting point in your new code.
If memory serves, there is a wiki fragment floating about that gives some help about adding a transport equation. David 

January 23, 2008, 13:54 
Dear Ivan,
what you need to

#3 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
Dear Ivan,
what you need to do is easily doable in OpenFOAM, supposing you can convert the velocity field you have into the openFOAM format. About the solver, give a look to scalarTransportFoam, in OpenFOAM/OpenFOAM1.4.1/applications/solvers/basic With a little change, you can adapt it to your case. With kind regards, Alberto 

January 24, 2008, 16:10 
Hi,
I'm a complete beginner t

#4 
New Member
Manuel Larenas Aravena
Join Date: Mar 2009
Location: Santiago, Chile
Posts: 15
Rep Power: 8 
Hi,
I'm a complete beginner too. Today, I started modeling dust particles in presence of a velocity field, I think they are similar problems! Alberto, when you say "give a look" to that solver... what do you mean? I understand the basics of the code... but I dont know exactly how to use it (I just completed the UserGuide cases, but you don't have too much work here... :P) I have already calculated (using simpleFoam) the velocity field, so... now comes the dust part. Please, we need help! Best regards, Manuel 

January 25, 2008, 06:34 
Hello
Make a copy of the si

#5 
Senior Member

Hello
Make a copy of the simpleFoam solver (e.g. simpleFoam2), then edit simpleFoam2.C and add the scalar transport equation from scalarTransportFoam.C. Search the forum for this particular problem, I think it has been addressed a few times. Regards, José Santos 

January 27, 2008, 13:05 
Hello Manuel,
what I meant

#6 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
Hello Manuel,
what I meant is that scalarTransportFoam calculates the evolution in time of a passive scalar in a frozen velocity field. If you already calculated the velocity field with simpleFoam and you simply want to trace a passive scalar using that velocity field, you can do as follows:  Clone the scalarTransportFoam tutorial.  Copy the mesh of your case in it (blockMeshDict if you use blockMesh) and generate the grid.  Copy the velocity field (U) you calculated in the case directory.  Adapt the boundary conditions for T to your case.  Run the case. Of course, if you want to couple the calculation of the velocity field with the solution of the scalar transport equation you should do what José suggested above. Regards, Alberto 

January 28, 2008, 09:59 
Hi Alberto,
thank you very mu

#7 
New Member
Manuel Larenas Aravena
Join Date: Mar 2009
Location: Santiago, Chile
Posts: 15
Rep Power: 8 
Hi Alberto,
thank you very much for your reply. I did what you said, I gave a look to the tutorial case (pitzDaily) in scalarTransportFoam and copied the velocity field I calculated before to a cloned case. Unfortunately, it seems that T does not diffuse from the boundary... I tried everything... but with no results. Can you give a look to my case please? I could send it to your email (~10 mb), it shouldn't take more than 5 minutes to you Best regards, Manuel 

January 29, 2008, 12:05 
Read your email :)
Regard

#8 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
Read your email :)
Regards, A. 

January 30, 2008, 07:25 
Hi all.
I have similar prob

#9 
New Member
Hyunchang Lee
Join Date: Mar 2009
Location: Daejeon, Korea
Posts: 11
Rep Power: 8 
Hi all.
I have similar problem you guys. I'm trying to solve some scalar transport equations, But there is some difference in my problem with what is mentioned above. It is that the flux is influenced by the transported scalar. so I added this line after solving U eqn.  surfaceScalarField coeffiC4 = rhoa/rhob/18./nub*fvc::interpolate(m6); surfaceScalarField coeffi4 = (coeffiA  coeffiB)*coeffiC4; fvScalarMatrix m4Eqn ( fvm::ddt(m4) + fvm::div(phib + coeffi4/(fvc::interpolate(m4)), m4, "div(phib,m0)") ); m4Eqn.relax(); m4Eqn.solve();  So I want the flux(phib + coeffi4/(fvc::interpolate(m4))) be changed as m4 is changed during iteration. Do you think I am going right way? I'm not sure that it reads flux each iteration inside of solver. Any advices will be appreciated Thanks. Hyunchang. 

January 30, 2008, 07:31 
And anybody knows what 'm4Eqn.

#10 
New Member
Hyunchang Lee
Join Date: Mar 2009
Location: Daejeon, Korea
Posts: 11
Rep Power: 8 
And anybody knows what 'm4Eqn.relax()' means?
I know this question could be foolish, but I did. 

January 30, 2008, 17:25 
Hi all:
I need modelling a

#11 
New Member
Antonieta Silva
Join Date: Mar 2009
Location: Concepcion, Chile
Posts: 15
Rep Power: 8 
Hi all:
I need modelling a heat transfer in a steel ball with his surface a constant temperature, the temperature of the surface is more less than of the interior. All this in transient. My mesh is a semicircle.... I begin do this with buoyantFoam.... but... i have a question... where put h, cp, rho???... and... the thermophysical properties i suppose that are of the ball... or not?? I hope you can help me.... Antonieta... 

January 31, 2008, 04:07 
Hi Antonieta,
If the surface

#12 
Senior Member
Dragos
Join Date: Mar 2009
Posts: 647
Rep Power: 11 
Hi Antonieta,
If the surface temperature of the ball is constant, and you are interested only in the temperature inside the ball, why don't you use directly the laplacianFoam? Why do you need the buoyanFoam solver? Dragos 

January 31, 2008, 08:42 
Hola compatriota!
same thing.

#13 
New Member
Manuel Larenas Aravena
Join Date: Mar 2009
Location: Santiago, Chile
Posts: 15
Rep Power: 8 
Hola compatriota!
same thing... buoyantFoam is a transient solver for turbulent fluids, so I don't understand why you're using it for the steel ball. Maybe you could explain your model better Saludos, Manuel 

January 31, 2008, 08:58 
Dear Dragos
My problem is

#14 
New Member
Antonieta Silva
Join Date: Mar 2009
Location: Concepcion, Chile
Posts: 15
Rep Power: 8 
Dear Dragos
My problem is a hot steel ball that cold with water... but for simplicity (and because first I have to do in this form) I suposse that the surface temperature is less than of the interior.... And I use BuoyantFoam because i think that is the best solver fot heat transfer in transient... and because the temperature in the sphere change with the properties that have (k, rho, Cp,...).... or not?? Now I use laplacianFoam to probe... but I don't know if I can add the properties of the sphere... :S What is the best solver to this??? laplacian??? buoyant??? other??? Antonieta 

January 31, 2008, 09:20 
Ok, a little more light came h

#15 
Senior Member
Dragos
Join Date: Mar 2009
Posts: 647
Rep Power: 11 
Ok, a little more light came .
If you want to compute the whole domain (including water and steel) then you have a so called conjugate heat transfer problem. In this case you have two different sets of equations to solve on two different domains: 1. NavierStokes or other simpler model for the fluid region. 2. Heat equation for the solid region. As I understood, Hrv developed a new coupled block mesh library which is able to solve such a problem: Integrated conjugate heat transfer solver in OpenFOAM Some time ago, Daniele wrote also a conjugate heat transfer solver: conjugate heat transfer. So you may try those examples above. But if you have constant temperature at the surface of the ball, I don't see the need to compute the fluid flow. Consequently, you should solve only the heat equation inside the solid domain. That you can do by using the laplacianFoam solver. The properties you mention (k, rho, Cp), are included in the heat diffusivity coefficient (DT = k/rho/Cp) in constant/transportProperties dictionary. I hope this will help you! Dragos 

January 31, 2008, 09:20 
Hi Manuel...
I am really n

#16 
New Member
Antonieta Silva
Join Date: Mar 2009
Location: Concepcion, Chile
Posts: 15
Rep Power: 8 
Hi Manuel...
I am really new in this... and anybody of my partners know something about OF... can you give me your mail for explain better my problem... because it's more easy to me explain all in spanish.... I wait your answer... Thank! 

January 31, 2008, 09:24 
Hi, all.
Are there anybody wh

#17 
New Member
Hyunchang Lee
Join Date: Mar 2009
Location: Daejeon, Korea
Posts: 11
Rep Power: 8 
Hi, all.
Are there anybody who can help? :) maybe I need to clarify my question to make myself understood. Here I go. I'm solving a scalar transport equation like ddt(psi) + div(phi, psi) = 0 but here phi is a function of psi. So it should be changed in the iteration. So I write a code like this. fvScalarMatrix m4Eqn ( fvm::ddt(m4) + fvm::div(phib + coeffi4/(fvc::interpolate(m4)), m4, "div(phib,m0)") ); m4Eqn.relax(); m4Eqn.solve(); Here, m4 is scalar what I want to solve and we already know phib and coeffi4 which don't change in this iteration. I have solved my cases by this code but it seems once it read flux then it doesn't read flux again, so the flux doesn't change and it is not what I want. T.T I'm not sure that myself is understood. any question or comments are welcomed!! Hyunchang 

January 31, 2008, 09:28 
Thank Dragos!
I had not rea

#18 
New Member
Antonieta Silva
Join Date: Mar 2009
Location: Concepcion, Chile
Posts: 15
Rep Power: 8 
Thank Dragos!
I had not realized of the diffusivity.... really... I was looking for DT in user's guide... because I know diffusivity like alpha... Thank again... I run now with laplacian... Antonieta 

January 31, 2008, 11:14 
No problem Antonieta!
You can

#19 
New Member
Manuel Larenas Aravena
Join Date: Mar 2009
Location: Santiago, Chile
Posts: 15
Rep Power: 8 
No problem Antonieta!
You can see my email address in my profile, just clicking on my name I'm a beginner too, but we can help each other using email. Saludos, Manuel 

January 31, 2008, 11:24 
Hi Hyunchang,
if I'm not wron

#20 
New Member
Manuel Larenas Aravena
Join Date: Mar 2009
Location: Santiago, Chile
Posts: 15
Rep Power: 8 
Hi Hyunchang,
if I'm not wrong, you need to solve the coupled equations... in that case I recommend you to email Alberto Passalacqua (he posted above). He sent me a very useful solver coded by himself, he is a very nice guy ;) I'm just a beginner, so... it's all the help I can give you by now. Kind regards, Manuel 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
i am beginner for cfd  robbin  CFX  1  December 31, 2005 12:54 
Beginner question OddEven Decoupling in SIMPLE Solver  brooksmoses  OpenFOAM Running, Solving & CFD  2  November 9, 2005 20:38 
beginner  tzari  Phoenics  0  December 2, 2003 04:39 
Beginner  Subash  Main CFD Forum  1  September 16, 2003 00:35 
UDF Beginner  M. A. Rakib  FLUENT  1  June 6, 2000 11:23 