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

Different material properties on the same mesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2008, 17:53
Default Hi everyone, I am trying to
  #1
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17
fw407 is on a distinguished road
Hi everyone,

I am trying to create a mesh which has different material properties on the specified domains of the mesh. I am thinking that maybe I can make the material properties a field, then I can define different properties on the specified domain. Is that possible? or could someone give me some better ideas on this problem?

Kind regards

feng
fw407 is offline   Reply With Quote

Old   June 27, 2008, 04:53
Default Hi feng! No that is the way
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi feng!

No that is the way to go. As a simple example try to change the constant D to a field in the laplacianFoam-solver.

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   June 27, 2008, 06:33
Default Hi Bernhard, Thanks for you
  #3
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17
fw407 is on a distinguished road
Hi Bernhard,

Thanks for your help!

I have defined the diffusivity to be a field, and specified different diffusivity in the "transportProperties" for different domains, but
I don't know how to specify the regions of the mesh with different diffusivity. I am thinking maybe a sub-domain for the mesh could help me, is that right?

Kind regards

feng
fw407 is offline   Reply With Quote

Old   June 27, 2008, 07:23
Default Hi Feng! If your regions ar
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Feng!

If your regions are rectangles then you can use the setField-utility (have a look at the damBreak-case). If you're going for something more fancy try funkySetFields. Or you'll have to program yourself a utility.

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   June 27, 2008, 18:43
Default Hi Bernhard, I am trying to
  #5
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17
fw407 is on a distinguished road
Hi Bernhard,

I am trying to solve the stress distribution of a elastic body which has different Young's modulus. and "setFields" is a good starting point for me to solve such problems. I have defined the Young's modulus , Poisson ratio and lame's constant as a "volScalarField", then I added the "setFieldsDict" file in the "system" directory, which looks like:

/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
volScalarFieldValue E 20000000
volVectorFieldValue nu 0.3
);

regions
(
boxToCell
{
box (0 2.5 -0.11) (2 3 0.132);

fieldValues
(
volScalarFieldValue E 2000000
);
}
);


// ************************************************** *********************** //

but when I use "setFields", I run into errors :

Setting field default values
--> FOAM Warning :
From function void setFieldType(const fvMesh& mesh, const labelList& selectedCells,Istream& fieldValueStream)
in file setFields.C at line 100
Field E not found


--> FOAM FATAL IO ERROR : wrong token type - expected word found on line 27 the label 20000000

file: /home/snail/OpenFOAM/snail-1.3/run/tutorials/materialStressedFoam/wedge/system/s etFieldsDict::defaultFieldValues at line 27.

From function operator>>(Istream&, word&)
in file primitives/strings/word/wordIO.C at line 67.

FOAM exiting

the error tells me that the field I defined for E is not found, How could I help the compiler find it?

Kind regards

feng
fw407 is offline   Reply With Quote

Old   July 1, 2008, 05:38
Default Sorry feng! I don't know an
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Sorry feng!

I don't know anything about the setFields utility that isn't in the userguide.
But it seems to me that at least for nu to be a vector (really?) like you specified it shoul look something like this "(0.3 0 0)" or such

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 1, 2008, 07:00
Default Hi Bernhard, Thanks for you
  #7
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17
fw407 is on a distinguished road
Hi Bernhard,

Thanks for your help!

It is a silly mistake(sorry about that). I have corrected it, but I still run into the same errors.

So far, I only define E and mu as a volScalarfield by IOobject, and create a "setFieldsDic" in the "system" directory, is that right?

Kind regards

feng
fw407 is offline   Reply With Quote

Old   August 6, 2008, 09:56
Default Hi everyone, So far, I have
  #8
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17
fw407 is on a distinguished road
Hi everyone,

So far, I haven't succed in achieving it, I think maybe it will be more helpful to make myself clear:

I want to creat a 3D unhealthy blood vessel, the geometry is acually a 3D straight pipe, at somewhere in the blood vessel innnerface, a small patch of the blood vessel innerface is unhealthy and the young's modulus following the Gaussian distribution and is much higher than some other places in the blood vessel.

Has anyone done this before or is there some utilities capable of doing this?

kind regards

feng
fw407 is offline   Reply With Quote

Old   August 6, 2008, 11:42
Default Hi Feng, in the development v
  #9
uwe
New Member
 
Uwe Janoske
Join Date: Mar 2009
Location: Germany
Posts: 15
Rep Power: 17
uwe is on a distinguished road
Hi Feng,
in the development version of OF-1.4.1 you can find a tutorial for the solver newStressedFoam named plateHole. In the definition of the rheologyProperties you can find an example how to define different materials (multiMaterial).

Uwe
uwe is offline   Reply With Quote

Old   April 18, 2011, 17:08
Default localized force with setField
  #10
New Member
 
Join Date: Oct 2010
Posts: 27
Rep Power: 15
albem is on a distinguished road
Hi everybody

I am a new OpenFOAM user, and I want to add a source term (body force) to icoFoam

I created a new field named "F" and added F to the N-S equation. After
compile, I tested it in a 2D Poiseuille flow configuration (2 parallel
plates), for the moment I want to use the force as an opposing force.

fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
== RHOM1*A123
);

solve(UEqn == -fvc::grad(p));


Using "setField" I have defined A123 as an opposing force to the flow in the x-direction, in a small region of the flow domain (a localized force), I am using a 2D rectangular domain of 20 units in x-direcion 2 units in y-direction, the force is zero in the whole domain except in 9.5<x<10.5 and -0.5<y<0.5, with values (-0.25, 0.0, 0.0)

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object setFieldsDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
volVectorFieldValue A123 (0.0 0.0 0.0)
);

regions
(
boxToCell
{
box (9.5 -0.5 0.05) (10.5 0.5 0.05);

fieldValues
(
volVectorFieldValue A123 (-0.25 0.0 0.0)
);
}
);


the problem was when I ran the solver and plotted the x-component of the force in the y-direction, its behaviour is not constant in the specified interval, please see the profiles.png file attached, also looking at the vector field force in Paraview it looks with different values in the specified domain,

it seems that the solver modifies the force and I do not know why?

Any suggestions will be appreciated!

thanks in advance

Alberto
Attached Images
File Type: png profiles.png (5.9 KB, 23 views)
albem is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
material properties rayy FLUENT 1 March 28, 2007 17:23
Material properties rayy FLUENT 0 February 25, 2007 22:16
Material properties Tomik FLUENT 1 October 24, 2006 19:04
material properties of NiO, etc. sean FLUENT 0 March 26, 2001 11:32
material properties of NiO sean FLUENT 0 March 26, 2001 11:32


All times are GMT -4. The time now is 19:39.