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

Implemention of SlidingMesh in the Compressible LES solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 13, 2006, 09:56
Default You found a bug. There's bits
  #1
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
You found a bug. There's bits missing in lnInclude/fvcMeshPhi.C. In the second and third function multiply the return with rho, e.g.


template<class>
tmp<surfacescalarfield> meshPhi
(
const dimensionedScalar& rho,
const GeometricField<type,>& vf
)
{
//HJ, Missing rho. 13/Dec/2006
return rho*fv::ddtScheme<type>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
)().meshPhi(vf);

}

Alternatively, you can just hack it in the top-level code by multiplying the flux with rho

Apologies,

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

Old   December 14, 2006, 09:22
Default Hi Hrvoje Thanks for the he
  #2
New Member
 
Fredrik Hellstrom
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 9
Rep Power: 17
fredrikh is on a distinguished road
Hi Hrvoje

Thanks for the help.

I did the change in the top-level code, (with some help from Eric Lillberg)

Regards

Fredrik
fredrikh is offline   Reply With Quote

Old   March 22, 2007, 04:05
Default Hi Hrv and Fredrik, Let's f
  #3
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Hi Hrv and Fredrik,

Let's fix the other bug in fvcMeshPhi.C, I propose the following change...

template<class>
tmp<surfacescalarfield> meshPhi
(
const volScalarField& rho,
const GeometricField<type,>& vf
)
{
//Eric, Missing interpolated rho 22/Mars/07
return fvc::interpolate(rho)*fv::ddtScheme<type>::New
(
vf.mesh(),
vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
)().meshPhi(vf);
}

Keep in touch,

//Eric
lillberg is offline   Reply With Quote

Old   March 22, 2007, 08:22
Default Nope. I thought about it: me
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Nope. I thought about it: meshPhi only needs the fields to find the temporal discretisation scheme from the dictionary and return the correct motion fluxes. If you think what is going on here, the scheme will force a certain type of density interpolation onto you, and it is by no means clear I want to multiply the motion flux by rho in any case.

For my taste, I would say that meshPhi returns meshPhi. It is a bit unfortunate and misleading that it takes rho as an argument: it may be better to just take a string.

Therefore, the correct dimension for meshPhi is m^3/s and you can easily manipulate the flux afterwards. Of course, we need agreement on this...

Speak to me,

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

Old   March 22, 2007, 08:31
Default I agree on that the mesh flux
  #5
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
I agree on that the mesh flux should be a pure flux and whatever has to be done with it to conform to a specific algorithm should be done in top level code. I suggests that the additional arguments to fvcMeshPhi are dropped.

What do you think?

//Eric
lillberg is offline   Reply With Quote

Old   March 22, 2007, 08:40
Default You see, that's the problem: t
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
You see, that's the problem: they cannot be dropped (and I'd really love to). This is to do with second- or higher-order accuracy on the moving mesh. When, for example, you are using second order in time, the mesh flux is not simply the volume swept by the face in motion, but (as Zeljko has explained and tested to death) it needs to be consistent with the discretisation of the ddt term. For example, for a 3-time-level scheme, you will need to use 2 old motion fluxes and manipulate them into meshPhi, just as you use 3 leves of cell volume. If this gets scwered up, you lose second order in time.

In any case, meshPhi is a part of the ddt scheme and I need to know how to construct one - hence all this stuff with a name. The real options I see is either to give meshPhi a string with the name of the ddt scheme, or to look it up from the discretisation dictionary. In any case, a scheme needs to be made - that's why it looked ugly in the first place.

Hmm,

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

Old   November 4, 2008, 19:13
Default Is this bug fixed in ver 1.4?
  #7
eno
New Member
 
Sean Bian
Join Date: Mar 2009
Posts: 19
Rep Power: 17
eno is on a distinguished road
Is this bug fixed in ver 1.4?
eno 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
Compressible nonNewtonian solver berryk OpenFOAM Running, Solving & CFD 2 November 16, 2015 06:13
compressible, 2D NS solver? john Main CFD Forum 2 September 16, 2008 01:16
New compressible solver problem evan OpenFOAM Running, Solving & CFD 0 February 7, 2008 14:49
Implemention of SlidingMesh in the Compressible LES solver fredrikh OpenFOAM Running, Solving & CFD 5 March 23, 2007 08:40
Compressible solver shuo OpenFOAM Running, Solving & CFD 1 October 22, 2006 22:19


All times are GMT -4. The time now is 22:49.