Hi everybody, I am trying t
I am trying to solve solidification/melting problems, smearing out release of latent heat over a temperature intervall around melting point, i.e. would like to solve this:
d/dt(rho*cp*T+l*g(T)) -laplacian(DT,T) = 0
Forgetting for the moment cp, rho,l (latent heat),
I created a volScalarField g_T (dimensionSet(0,0,0,1,0,0,0), and assign values (0 below melting point, then a transition, 1 above).
The field T has the same dimension.
Simple-hearted as I am, then tried to do this:
fvm::ddt(T) +fvm::ddt(g_T) - fvm::laplacian(DT, T)
compiles, but then
--> FOAM FATAL ERROR : incompatible fields
for operation [T] + [g_T]
Thank you very much for any hint ...
I think this is because you ar
I think this is because you are trying to solve for two different variables at the same equation (same matrix).
If you want the term on g(T) implicit, I think you should decompose ddt(g(T)) into something like ddt(g) * ddt(T) using chain rule. If you cannot calculate ddt(g) analitically (gl in chain rule) pehaps you can use something like:
fvc::ddt(g_T)/fvc::ddt(T) * fvm::ddt(T)
||||||||||| gl explicit ||||||||||||||||| implicit
You will need some correction tought if fvc::ddt(T) gets close to zero...
(I never tried something like this, better listen to what more experienced people has to say about it... http://www.cfd-online.com/OpenFOAM_D...part/happy.gif )
thanks a lot...works with chai
thanks a lot...works with chain rule.
In fact somehow trivial, but when you are new to this its sometimes confusing http://www.cfd-online.com/OpenFOAM_D...part/happy.gif
Hello,all, I am trying to s
I am trying to study anisotropic eddy viscosity effect to my simulation. I created an anisotropic viscosity ternsor "nuEffAn" in the turbulenceModel.H file and also modified the momentum equation in kOmegaSST.C as following.
tmp<fvvectormatrix> kOmegaSST::divR(volVectorField& U) const
- fvm::laplacian(nuEffAn(), U)
//- Return the effective anisotropic viscosity ternsor
virtual tmp<voltensorfield> nuEffAn() const
new volTensorField("nuEffAn", nut()*T2 + nu()*T1)
After compiled the turbulence model, while I start my simulation, I got following error message:
--> FOAM FATAL ERROR : incompatible fields for operation
[U] + [region0]#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&)
#2 void Foam::checkMethod<foam::vector<double> >(Foam::fvMatrix<foam::vector<double> > const&, Foam::fvMatrix<foam::vector<double> > const&, char const*)
#3 Foam::tmp<foam::fvmatrix<foam::vector<double> > > Foam::operator+<foam::vector<double> >(Foam::tmp<foam::fvmatrix<foam::vector<double> > > const&, Foam::tmp<foam::fvmatrix<foam::vector<double> > > const&)
#6 __gxx_personality_v0 at /usr/src/packages/BUILD/glibc-2.3/csu/../sysdeps/i386/elf/start.S:122
From function checkMethod(const fvMatrix<type>&, const fvMatrix<type>&)
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.4/src/finiteVolume/lnInclude/fvMatrix.C at line 1005.
Can anybody tell me what I did wrong? Thanks.
could you please be more specific on the chain rule applied. I have some doubt that ddt(g)*ddt(T) is correct, I think it should be ddT(g)*ddt(T) instead. Something like ddT is not implemented in OF, or?
Please corect me if I'm wrong.
|All times are GMT -4. The time now is 18:37.|