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

laplacian for local "elements"

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2013, 13:13
Default laplacian for local "elements"
  #1
New Member
 
Fabian Wein
Join Date: Jan 2013
Posts: 13
Rep Power: 13
Fabian_W is on a distinguished road
I have a non-regular grid.

I need to have a matrix at hand for the Laplacian operator.

I do
fvMatrix<scalar> m = fvm::laplacian(k, h);
where h seems (and shall be) irrelevant.

Now to my issue. I need to work on a subset of the nodes. Say 10 nodes are of interest.
I can set all nodes but the few special one in k to zero and get m which is zero in most coefficients.

The question is, is there a way to construct a smaller m?

One idea is, to create a smaller vector k which has only the nodes from the set and all neighbors of these nodes. Is this a good idea? How can I construct such a volScalarField?

I'm quite new to OpenFOAM, help is very much appreciated!

Fabian
Fabian_W is offline   Reply With Quote

Old   February 14, 2013, 12:56
Default
  #2
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
Hi,

I am not sure if this is of any help, but...
In OF you can have "k = k(x,y,z)" (diffusion coeff) which is function of space. So maybe solution to your problem is to define "k" in a way that it has some value in desired nodes, and zero in other. But then there are two different types of equations in one domain.

Other way would be two define two meshes (or sub-mesh) on which different equations could be solved.

best
ZZM
ziemowitzima is offline   Reply With Quote

Old   February 15, 2013, 09:33
Default
  #3
New Member
 
Fabian Wein
Join Date: Jan 2013
Posts: 13
Rep Power: 13
Fabian_W is on a distinguished road
Thanks for your reply.

Setting almost everything in k indeed does the job but it is too slow as I need to do it a million times for different selected nodes.

I currently try to implement the stencil by myself. Any hint? link?

Thanks,

Fabian
Fabian_W is offline   Reply With Quote

Reply

Tags
laplacianfoam

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
Modifying the laplacian operator mlawson OpenFOAM Running, Solving & CFD 22 July 16, 2018 05:56
How to calculate laplacian of a scalar in cfx? Jun CFX 21 March 2, 2018 10:08
Some questions about Laplacian with nonorthogonal correction koderer OpenFOAM 3 December 12, 2012 18:30
Laplacian term in SimpleFoam oscar_urri OpenFOAM 1 December 5, 2012 18:26
why laplacian() failed OFCrash OpenFOAM Running, Solving & CFD 1 February 1, 2010 08:32


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