|
[Sponsors] |
LAPLACIAN FOAM for solid/fluid region in a slab |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 6, 2015, 04:12 |
LAPLACIAN FOAM for solid/fluid region in a slab
|
#1 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
I am new to OpenFOAM so i dont know how to solve the laplacianfoam for the case of two materials present in a slab?
in that case how to mention two region properties and where? Please can anyone help me. Thanks in Advance Last edited by Arslan Arshad; April 6, 2015 at 04:13. Reason: wrong titles |
|
April 15, 2015, 15:09 |
|
#2 |
New Member
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 11 |
Hi
u can define new volscalarField of properties for your domain and use it in your code. |
|
April 15, 2015, 20:21 |
|
#3 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
Hi
Thanks for the reply, but tell me how i am new to OpenFoam. |
|
April 16, 2015, 04:24 |
|
#4 |
New Member
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 11 |
define a new volscalarfield in file "arslan.H" for example and type :
//--------------------------------------------------------- #include "createMesh.H" volScalarField dT ( IOobject ( "dT", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); //-------------------------------------------------------------- ("dT" is such diffusion number) if u want solve thermal or electrical field in your domain with different material this file has read with your code. so u must create "dT" file such as "T" file in your "0" folder (0 - constant - system) after this, for initializing the dT constant properties like u want append subsequent code end of write "volScalarField dT ......" ::::: //-------------------------------------------------------------------- dT.intenalField() [ mesh.cellZones()[0] ] = dT_0; dT.intenalField() [ mesh.cellZones()[1] ] = dT_1; . . . //--------------------------------------------------------------------- because of error in "check dimension" set dimension dimensionless : @ T , dT file [0 0 0 0 0 0 0 0] in body of main source code : //-------------------------------------------------- #include "arslan.H" slove(.. . . . . ) //-------------------------------------------------- |
|
April 16, 2015, 04:28 |
|
#5 |
New Member
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 11 |
of course in T file dimension set :
[0 2 0 0 0 0 0 0] for eliminate Laplace operator dimension |
|
April 16, 2015, 04:36 |
|
#6 |
New Member
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 11 |
plz che ck this solver:
chtMultiRegionFoam perhaps good for your attend |
|
April 17, 2015, 03:22 |
|
#7 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
"dT.intenalField() [ mesh.cellZones()[0] ] = dT_0;
dT.intenalField() [ mesh.cellZones()[1] ] = dT_1;" I want to make Slab (2-D) geometry in gambit and want to divide my length in 2 equal parts lets say 0.5m each. Then how to mention cell zone in my case |
|
April 17, 2015, 10:16 |
|
#8 |
New Member
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 11 |
in gambit create 2 rectangle volume (for example) that face between them is "interior"
remember geometry must be 3D; set name of left volume be "left" set name of right volume be "right" (next tab u set bc in gambit : "fluid") and type of bc must be wall with different name(this is for refuse unscheduled ERROR) after using " fluent3DTo.... name.msh " command in boundary file change the type of bc from wall to everything u want... when this is done u have : cellzones - faceZones file and u can see inner cellZones file like this: ''''''''''''''''''''''''''''''''''''''''' 4 ( liq { type cellZone; cellLabels List<label> 10620 ( 0 1 2 3 4 . . . '''''''''''''''''''''''''''''''''''''''''''''''' |
|
April 19, 2015, 11:40 |
|
#9 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
Thank you for your help
I have tried with the geometry you told and coding but something is wrong. I dont know what is wrong. Please tell me your email id. I will send the geometry files. Check it. I shall be very thankful to you. |
|
April 19, 2015, 11:43 |
|
#10 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
||
April 22, 2015, 02:26 |
|
#11 |
New Member
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 11 |
hi
i check this and reply to u |
|
April 22, 2015, 18:24 |
|
#12 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
Hi
Thank You |
|
April 23, 2015, 00:57 |
|
#13 |
New Member
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 11 |
hi again
I look inside file and check it in gambit: you first create sides (out cubic) BC (interior - left - right - and sides that not applied) and export *.msh file create root folder for your running on linux (without any " "/space/ character like : "new folder") it has an ERROR inside this file create and put (constant - system) sub root folder in constant folder : create empty folder polyMesh finally run this : fluent3DMeshToFoam *.msh * is file name after this ,go to polyMesh folder and look inside CellZone - faceZone files |
|
April 23, 2015, 21:50 |
|
#14 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
I tried the procedure u told me.
i made "arslan.H" file and include in my code "#include arslan.H" but when i gave command in terminal "wmake" for compilation of dependency file i got the following error. -------------------------------------------------------------------------------------------- In file included from laplacianFoam.C:71:0: arslan.H: In function int main(int, char**): arslan.H:19:4: error: no match for call to (Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}) () arslan.H:20:4: error: no match for call to (Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}) () arslan.H:39:7: error: no match for call to (Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}) () arslan.H:40:7: error: no match for call to (Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}) () make: *** [Make/linux64GccDPOpt/laplacianFoam.o] Error 1 ------------------------------------------------------------------------------------------- what should i do? |
|
April 23, 2015, 21:51 |
|
#15 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
Also i am attaching the file "arslan.H" please check it too.
its urgent i have to submit this work in a week. |
|
April 23, 2015, 21:52 |
|
#16 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
Thanks in advance.
|
|
April 24, 2015, 11:12 |
|
#17 |
New Member
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 11 |
i see.
//---------------------------------------------------------// #include "createMesh.H" Info<< "Reading field DT\n" << endl; volScalarField DT ( IOobject ( "DT", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); // edit : double dt[2] = {0.0087, 0.0084}; forAll(mesh.cellZones(),i) { forAll(mesh.cellZones()[i],j) { int index = mesh.cellZoens()[i][j]; DT.internalField()[index] = dt[i]; // (i don't remember - maybe DT.internalFields() ) } } //////////////////////////////// do this for k and then if the BC not set u can set them by this variables: DT.boundaryField()[][] mesh.faceZones() // like zones this is for interface BC enjoy it |
|
April 26, 2015, 04:52 |
|
#18 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
i am still facing errors i will send you my solver with geometry.......i hope u will check it.
|
|
April 26, 2015, 06:36 |
|
#19 |
New Member
mostafa raeisi
Join Date: Dec 2014
Posts: 14
Rep Power: 11 |
send your errors
i do this and works good |
|
April 26, 2015, 08:24 |
|
#20 |
New Member
Join Date: Mar 2015
Posts: 25
Rep Power: 11 |
I am attaching the solver
please u have the geometry link and there is nothing in "polyMesh" folder it is empty. (please use the command fluent3DMeshToFoam HSlab.msh) and when you use the command "wmake" for compilation of dependency file. error appears please check i think i have some errors in declaration Thank You |
|
|
|
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 |