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

Modify fvmSupC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2006, 17:22
Default Hello Is it possible to cha
  #1
Member
 
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 17
nico is on a distinguished road
Hello

Is it possible to change fvmSup.C so that it can be used for volVectorFields oder volTensorfields, too? I tried to add the following lines:

template<class>
tmp<fvmatrix<type> >
Sp
(
const volVectorField& sp,
GeometricField<type,>& vf
)
{
const fvMesh& mesh = vf.mesh();

tmp<fvmatrix<type> > tfvm
(
new fvMatrix<type>
(
vf,
dimVol*sp.dimensions()*vf.dimensions()
)
);
fvMatrix<type>& fvm = tfvm();

fvm.diag() += mesh.V() * sp.internalField();

return tfvm;
}

template<class>
tmp<fvmatrix<type> >
Sp
(
const tmp<volvectorfield>& tsp,
GeometricField<type,>& vf
)
tmp<fvmatrix<type> > tfvm = fvm::Sp(tsp(), vf);
tsp.clear();
return tfvm;
}


Of course it didn't work that way because the dimensions in line "fvm.diag() += mesh.V() * sp.internalField(); " did not fit. Can anybody tell me how to do this right?
thanks
nico is offline   Reply With Quote

Old   January 22, 2006, 17:36
Default Can't do it at the moment. Th
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Can't do it at the moment. The matrix support given by the lduMatrix class only allows a scalar diagonal and off-diagonal, which is then through tricks (ugly and painful ones) expanded to a vector diagonal but only in the near-wall cells and for the boundary condition handling.

In order to do this, you need a vector diagonal throughout and for this you will need my new block matrix stuff. However, this is still experimental and I'm considering whether to re-base the whole FVM discretisation on it or not (FEM will definitely go that way).

In short, not easy and requires a major rewrite.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 23, 2006, 09:40
Default Okay thank u you told me in
  #3
Member
 
Nico Petry
Join Date: Mar 2009
Posts: 36
Rep Power: 17
nico is on a distinguished road
Okay thank u

you told me in another thread that for porous material i only have to solve darcys law. I understand now that the confection term and the diffusion term of the momentum equation are negligible but my problem stay. I don't know how to implement this term for directetd permeabilities.

nu/K*U=grad(p)

I hoped that it is possible to change fvmSus.C, but as you told me, it isn't.
I would be very thankful, if you gave me some more hints.

Thanks a lot

P.S. I don't know if it matters, but I am looking for symmetric tensorial resistance.


Nico
nico 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
Modify the htc using UDF on NT frederic FLUENT 1 February 24, 2020 00:26
How to modify velocity with UDF jddmsh FLUENT 0 June 28, 2003 22:59
How to modify a value by a UDF? jwt FLUENT 3 May 23, 2003 13:01
modify viscosity tian CFX 0 April 16, 2002 00:39
how to modify model wang FLUENT 1 April 14, 2002 04:40


All times are GMT -4. The time now is 21:26.