|
[Sponsors] |
August 31, 2005, 07:18 |
Hi everybody,
I am trying t
|
#1 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
Hi everybody,
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: solve ( 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 ... |
|
August 31, 2005, 08:55 |
I think this is because you ar
|
#2 |
Member
diablo80@web.de
Join Date: Mar 2009
Posts: 93
Rep Power: 17 |
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... ) |
|
August 31, 2005, 09:17 |
thanks a lot...works with chai
|
#3 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
thanks a lot...works with chain rule.
In fact somehow trivial, but when you are new to this its sometimes confusing |
|
November 27, 2007, 13:07 |
Hello,all,
I am trying to s
|
#4 |
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17 |
Hello,all,
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 { return ( - fvm::laplacian(nuEffAn(), U) - fvc::div(nuEffAn()&dev(fvc::grad(U)().T()))+(2.0/3.0)*fvc::grad(k_) ); } //- Return the effective anisotropic viscosity ternsor virtual tmp<voltensorfield> nuEffAn() const { tensor T1(1,1,1,1,1,1,1,1,1); tensor T2(0.6,1,1,1,1,0.6,1,0.6,1); return tmp<voltensorfield> ( 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:stream&) #1 Foam::error::abort() #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&) #4 main #5 __libc_start_main #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. |
|
April 7, 2010, 07:48 |
|
#5 |
New Member
mediode
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
@tehache
Hi, 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. Cheers m* |
|
January 30, 2018, 16:32 |
|
#6 | |
New Member
Join Date: Jan 2018
Posts: 19
Rep Power: 8 |
Have you solved this problem? Thanks!
I will be greatly appreciated if you replied me. Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Incompatible fields for operation divphi Ub | vvqf | OpenFOAM Running, Solving & CFD | 4 | April 4, 2018 04:28 |
incompatible fields for operationproblem in simpleFoam | kbr | OpenFOAM Running, Solving & CFD | 3 | March 10, 2009 11:25 |
Incompatible fields for operation | su_junwei | OpenFOAM Pre-Processing | 1 | October 15, 2008 09:34 |
TurbFoam simpleFoam incompatible fields for operation | braennstroem | OpenFOAM Running, Solving & CFD | 0 | June 19, 2008 11:43 |
The incompatible of UDF | Summer | FLUENT | 3 | April 23, 2007 05:11 |