|
[Sponsors] | |||||
[blockMesh] How to define an volScalarField in part of the Mesh? |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
Ruud Vlaming
Join Date: Aug 2013
Posts: 6
Rep Power: 14 ![]() |
Hi,
I cannot find an example or solution for this probably very simple newbie problem. I work with electrostatics, but i do not think this is relevant, it is an general issue. I defined two cubes of size 1 next to each other, called left and right. If can define a uniform charge density in both cubes. With Code:
internalField uniform 1e-3; I really appreciate any help. These are my test files: Code:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
( (1 0 0) //0
(1 1 0) //1
(0 1 0) //2
(0 0 0) //3
(1 0 1) //4
(1 1 1) //5
(0 1 1) //6
(0 0 1) //7
(1 2 0) //8
(0 2 0) //9
(1 2 1) //10
(0 2 1) //11
);
blocks
( hex (0 1 2 3 4 5 6 7) (5 5 5) simpleGrading (1 1 1)
hex (1 8 9 2 5 10 11 6) (5 5 5) simpleGrading (1 1 1) );
boundary
(
topleft
{ type patch;
faces ( (4 5 6 7) ); }
topright
{ type patch;
faces ( (5 10 11 6) ); }
bottomleft
{ type patch;
faces ( (3 2 1 0) ); }
bottomright
{ type patch;
faces ( (2 9 8 1) ); }
frontleft
{ type patch;
faces ( (4 5 1 0) ); }
frontright
{ type patch;
faces ( (5 10 8 1) ); }
backleft
{ type patch;
faces ( (2 6 7 3) ); }
backright
{ type patch;
faces ( (9 11 6 2) ); }
leftleft
{ type patch;
faces ( (0 4 7 3) ); }
rightright
{ type patch;
faces ( (9 11 10 8) ); }
// This does not work?
// middle
// { type internal;
// faces ( (1 2 6 5) ); }
);
mergePatchPairs
(
);
Code:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object rho;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 -3 1 0 0 1 0];
// how to define this only for the left cube???
internalField uniform 1e-3;
boundaryField
{
topleft
{ type fixedValue;
value uniform 0; }
topright
{ type fixedValue;
value uniform 0; }
bottomleft
{ type fixedValue;
value uniform 0; }
bottomright
{ type fixedValue;
value uniform 0; }
frontleft
{ type fixedValue;
value uniform 0; }
frontright
{ type fixedValue;
value uniform 0; }
backleft
{ type fixedValue;
value uniform 0; }
backright
{ type fixedValue;
value uniform 0; }
leftleft
{ type fixedValue;
value uniform 0; }
rightright
{ type fixedValue;
value uniform 0; }
}
|
|
|
|
|
|
|
|
|
#2 |
|
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 130 ![]() ![]() ![]() ![]() ![]() ![]() |
Hi devlaam,
I'm guessing that you read the User Guide waaaay too fast ![]() This is explained here: http://www.openfoam.org/docs/user/da...#x7-530002.3.3 (section "2.3.3 Setting initial field") Best regards, Bruno
__________________
|
|
|
|
|
|
|
|
|
#3 |
|
New Member
Ruud Vlaming
Join Date: Aug 2013
Posts: 6
Rep Power: 14 ![]() |
Yep, guess you where right.
Works like a charm now. The biggest problem for the newbies is, i think, that we all have a idea how this should work, but that is not the way it works ... Thanks for your support! |
|
|
|
|
|
![]() |
| Tags |
| internalfield, volscalarfield |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
| Define total mesh diclpacement in theta Direction | omidiut | CFX | 1 | November 10, 2013 05:28 |
| Installing OF 1.6 on Mac OS X | gschaider | OpenFOAM Installation | 129 | June 19, 2010 10:23 |
| Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 19:10 |
| How to control Minximum mesh space? | hung | FLUENT | 7 | April 18, 2005 10:38 |