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

LAPLACIAN FOAM for solid/fluid region in a slab

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2015, 09:37
Default
  #21
New Member
 
Nicolas Thiers
Join Date: Mar 2015
Posts: 17
Rep Power: 11
nthiers is on a distinguished road
Hi arslan, hace you tried defining dt field and use setField utility to start dt field with different values for your two regions.
nthiers is offline   Reply With Quote

Old   April 26, 2015, 09:42
Default
  #22
New Member
 
Join Date: Mar 2015
Posts: 25
Rep Power: 11
Arslan Arshad is on a distinguished road
no i dont think so
Arslan Arshad is offline   Reply With Quote

Old   April 26, 2015, 09:43
Default
  #23
New Member
 
Join Date: Mar 2015
Posts: 25
Rep Power: 11
Arslan Arshad is on a distinguished road
by the way how to do it.... i am new to openfoam
Arslan Arshad is offline   Reply With Quote

Old   April 26, 2015, 10:05
Default
  #24
New Member
 
Nicolas Thiers
Join Date: Mar 2015
Posts: 17
Rep Power: 11
nthiers is on a distinguished road
Take a look at tutorial/multiphase/interfoam/system/setFieldsDict
There is used to initialize alpha field, but for your case just change alpha for dT and the boxToCell parameters to fit with your regions like this

Lets said that for the left region you need dt=0.1 and for the right dt=0.3

First set default value dt=0.1
Then in the boxToCell put the coordinates of the right region and inside put dt=0.3

Then use:
setField
yourSolver
Arslan Arshad likes this.
nthiers is offline   Reply With Quote

Old   April 26, 2015, 10:28
Default
  #25
New Member
 
Join Date: Mar 2015
Posts: 25
Rep Power: 11
Arslan Arshad is on a distinguished road
my geometry is 3d
left region (0.5x0.5x0.5) m
same is the dimension of right region
what is meant by boxToCell and how
what should be the coordinates.......please can you elaborate with example?
Arslan Arshad is offline   Reply With Quote

Old   April 26, 2015, 10:36
Default
  #26
New Member
 
Join Date: Mar 2015
Posts: 25
Rep Power: 11
Arslan Arshad is on a distinguished road
and is there any need to change the DT in "transportproperties"


and is there any need of making "DT" named file as "T" in folder named "0"

Arslan Arshad is offline   Reply With Quote

Old   April 26, 2015, 10:47
Default
  #27
New Member
 
Nicolas Thiers
Join Date: Mar 2015
Posts: 17
Rep Power: 11
nthiers is on a distinguished road
First of all you have to change the dt propertie to a volScalarField like mostafa said before.

Then you have to add the dt and T files to your 0 folder

(this was explained in a tutorial called "add temperature to icofoam" take a look on it, will be very helpful)

For the boxToCell utility, I have never used before soy I don't know exactly how to put the coordinates, for that you should search for your own, there is a interfoam tutorial on internet where there explain how to set it.

Sorry I can't help more with that
Arslan Arshad likes this.
nthiers is offline   Reply With Quote

Old   April 26, 2015, 11:06
Default
  #28
New Member
 
Join Date: Mar 2015
Posts: 25
Rep Power: 11
Arslan Arshad is on a distinguished road
i figured it out

boxToCell

(Min. Boundary coordinates) (Max. Boundary Coordinates);


you have to put minimum boundary coordinates and for maximum
that can be known by analysing your volume in software you are using for making geometry (in my case it is gambit)

thanks for the reply
will tell you about the solver after compiling it
Arslan Arshad is offline   Reply With Quote

Old   April 26, 2015, 12:17
Default
  #29
New Member
 
Join Date: Mar 2015
Posts: 25
Rep Power: 11
Arslan Arshad is on a distinguished road
is there any need for "DT" in folder "0"?

if yes then what should be the boundary conditions?
Arslan Arshad is offline   Reply With Quote

Old   April 26, 2015, 12:35
Default
  #30
New Member
 
Nicolas Thiers
Join Date: Mar 2015
Posts: 17
Rep Power: 11
nthiers is on a distinguished road
Yes it's necessary but how you arn't solving any transport equation for dt you don't need any boundary conditions but anyway the solver may ask you for them, in that case set any boundary condition fo dt like zerogradient
nthiers is offline   Reply With Quote

Old   April 26, 2015, 16:50
Default
  #31
New Member
 
Join Date: Mar 2015
Posts: 25
Rep Power: 11
Arslan Arshad is on a distinguished road
i tried the solver but it gives the same value of "DT" over both regoins....

any suggenstions?
Arslan Arshad is offline   Reply With Quote

Old   April 26, 2015, 17:51
Default
  #32
New Member
 
Nicolas Thiers
Join Date: Mar 2015
Posts: 17
Rep Power: 11
nthiers is on a distinguished road
can you show me yoru solver, your createFields.h, a schemes of your 0 folder and your setFieldsDict please
nthiers is offline   Reply With Quote

Old   April 26, 2015, 18:24
Default
  #33
New Member
 
Join Date: Mar 2015
Posts: 25
Rep Power: 11
Arslan Arshad is on a distinguished road
thank you for the help but i sorted it out

you have to rename your file "DT.org" instead of "DT"

and then in terminal go to the address of the solver folder
and type
"cp -r 0/DT.org 0/DT"

this will make the DT file. in the "0 folder"

then type the command "setFields".


you are all set to go......
Arslan Arshad is offline   Reply With Quote

Old   April 26, 2015, 18:28
Default
  #34
New Member
 
Nicolas Thiers
Join Date: Mar 2015
Posts: 17
Rep Power: 11
nthiers is on a distinguished road
thats right, let me know about your results.
nthiers is offline   Reply With Quote

Old   April 27, 2015, 04:11
Default
  #35
New Member
 
Join Date: Mar 2015
Posts: 25
Rep Power: 11
Arslan Arshad is on a distinguished road
it shows infinity when i put the condition on the right side of domain (type zeroGradient)

but gives the solution when i give the boundary condition (type fixedValue) on the right face.

and i want the solver to calculate the value at the right face.....where am i wrong?


THANKS in advance
Arslan Arshad is offline   Reply With Quote

Old   May 12, 2015, 23:27
Default
  #36
New Member
 
Nicolas Thiers
Join Date: Mar 2015
Posts: 17
Rep Power: 11
nthiers is on a distinguished road
Arslan sorry for the delay, am also doing some test with a problem like that and i figure that when use
div(phi,T) Gauss linear;

in the system/fvSchemes the T field diverges, but when use
div(phi,T) Gauss vanLeer;

it works fine in mi case, try it and let me know if it works
nthiers is offline   Reply With Quote

Old   February 16, 2017, 04:11
Default
  #37
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
Did u manage to solve the problem?
Can you post all the code?
Thanks in advance
ancolli 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
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 10:51
[OpenFOAM] Take derivative of mean velocity in paraFoam hiuluom ParaView 13 April 26, 2016 06:44
laplacian foam simulating diffusion through a porous media mcdonalds OpenFOAM Running, Solving & CFD 1 February 1, 2015 16:51
[Gmsh] GmshToFoam FOAM FATAL ERROR faces deallocated Tobias Prousa (Prousa) OpenFOAM Meshing & Mesh Conversion 14 January 31, 2012 10:45
Nonconvergence in a multiple region Laplacian problem kmurphy OpenFOAM Running, Solving & CFD 4 June 8, 2006 04:40


All times are GMT -4. The time now is 09:01.