|
[Sponsors] |
August 22, 2008, 15:23 |
Hi All,
How do I initialize
|
#1 |
Senior Member
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17 |
Hi All,
How do I initialize a problem where T is a field, not a single value at the boundary in case of scalarTranportfoam? Thanks Senthil |
|
August 22, 2008, 16:38 |
Hi Senthil,
I usually get a r
|
#2 |
Member
M. Mahdi Salehi
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 50
Rep Power: 17 |
Hi Senthil,
I usually get a reference to the scalar field and initialize it. In this way you have to change the application and recompile it. You can also use funkySetFields utility. You can find information about it in forum and wiki. I have never used it. Cheers, Mahdi |
|
August 22, 2008, 17:26 |
Hi Mahdi,
Thanks for your v
|
#3 |
Senior Member
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17 |
Hi Mahdi,
Thanks for your valuable input. I need some more help with the reference to scalar field. How can I go about doing that? Is there an example that you can share with me? Thanks in advance Senthil |
|
August 22, 2008, 18:27 |
Hi Senthil
If the distribut
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hi Senthil
If the distribution can be given in some algebraic way as a function of location, then I suggest that you go for the funkySetField application. See the following thread for information/inspiration : http://www.cfd-online.com/OpenFOAM_D...es/1/6821.html There is also a wiki, but I have problems connecting to it, but I believe the link is in the above thread. Have fun, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
August 22, 2008, 19:43 |
Hi Senthil,
It's pretty simpl
|
#5 |
Member
M. Mahdi Salehi
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 50
Rep Power: 17 |
Hi Senthil,
It's pretty simple. Let's say you have a scalar field T and you want to initialize it with a parabolic function of y; you may write: volScalarField yPos = mesh.C().component(vector::Y); forAll(T, counter) { T[counter] = yPos[counter]*(1.0 - yPos[counter]); } This is just for the internal field. If you also want to initialize the boudaries as well, let's say you have a boundary patch named inlet, you may write: label inletPatchID = mesh.boundaryMesh().findPatchID("inlet"); fvPatchScalarField& inletT = T.boundaryField()[inletPatchID]; const vectorField& faceCentresInlet = mesh.Cf().boundaryField()[inletPatchID]; forAll(inletT, pointI) { inletT[pointI] = faceCentresInlet[pointI].y()*(1.0 - faceCentresInlet[pointI].y()); } This is the way I do it, because I usually write my own applications and rarely have complex initial conditions. If you want to do it very often, I think it's better to use funkySetField application. Cheers, Mahdi |
|
August 25, 2008, 01:23 |
Hi All,
To make it a bit mo
|
#6 |
Senior Member
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17 |
Hi All,
To make it a bit more clearer, I have attached a acrobat file which explains what I would like to do with the scalarTransportFoam. \attach Thanks all in advance for your never ending help! Cheers, Senthil |
|
August 25, 2008, 01:25 |
My bad!
Thanks
Senthil
|
#7 |
Senior Member
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17 |
My bad!
Thanks Senthil |
|
August 25, 2008, 01:41 |
Sorry for a lot of messages. T
|
#8 |
Senior Member
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17 |
Sorry for a lot of messages. The file size was big
I have a complex temperature field (Figure 1). For the sake of argument, let us say it is defined by experiment and therefore is not expressible as a simple function of X, Y or Z In my application, I need to solve for the time-dependent movement of the temperature thought the geometry, as a function of self-diffusion and convection. Previously, I have solved (not in OF) the diffusion equation of this field (Figure 2). I also have from a previous run of OF, the separate solution of the incompressible Navier- Stokes equation. My problem is to use the pre-defined velocity field and now diffuse AND convect the temperature field. ScalarTransportFOAM has the right physics. My question is how do I initialize the problem. It almost seems like a 'restart'. Note the problem is decoupled in the sense that the velocity will influence (convect) the temperature field, but the temperature field has NO influence on the velocities. |
|
August 25, 2008, 10:45 |
Hello Senthil,
>let us say
|
#9 |
Guest
Posts: n/a
|
Hello Senthil,
>let us say it is defined by experiment and therefore is not expressible as a simple function of X, Y or Z You'll probably have to find an interpolation of your measured (or simulated) data as a function of X,Y,Z. Just having a "complex temperature field" without any mesh and without other structure gets you nowhere. >It almost seems like a 'restart' It *is* a restart. Write your temperature field as initial conditions into the file yourcase/0/T and run. Nadine |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
initialization | kunal | FLUENT | 5 | April 17, 2008 22:45 |
Initialization - VOF | moas | FLUENT | 4 | February 19, 2008 22:35 |
DPM Initialization | Johannes | FLUENT | 1 | June 20, 2007 09:27 |
initialization | alfa | FLUENT | 0 | March 19, 2006 10:26 |
Initialization of VOF | Jennie | Main CFD Forum | 4 | November 18, 1999 16:41 |