|
[Sponsors] |
Implemention of SlidingMesh in the Compressible LES solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 13, 2006, 09:56 |
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 |
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 |
|
December 14, 2006, 09:22 |
Hi Hrvoje
Thanks for the he
|
#2 |
New Member
Fredrik Hellstrom
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 9
Rep Power: 17 |
Hi Hrvoje
Thanks for the help. I did the change in the top-level code, (with some help from Eric Lillberg) Regards Fredrik |
|
March 22, 2007, 04:05 |
Hi Hrv and Fredrik,
Let's f
|
#3 |
Member
|
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 |
|
March 22, 2007, 08:22 |
Nope. I thought about it: me
|
#4 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
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 |
|
March 22, 2007, 08:31 |
I agree on that the mesh flux
|
#5 |
Member
|
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 |
|
March 22, 2007, 08:40 |
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 |
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 |
|
November 4, 2008, 19:13 |
Is this bug fixed in ver 1.4?
|
#7 |
New Member
Sean Bian
Join Date: Mar 2009
Posts: 19
Rep Power: 17 |
Is this bug fixed in ver 1.4?
|
|
|
|
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 |