one question about representation of equations?
Hi, I am new in openFoam, and I try to understand this equation from XiFoam solver:
{ fvScalarMatrix hEqn ( fvm::ddt(rho, h) + mvConvection>fvmDiv(phi, h)  fvm::laplacian(turbulence>alphaEff(), h) == DpDt ); hEqn.relax(); hEqn.solve(); thermo.correct(); } This is the enthalpy equation, I want to understand what is the meaning of each term, I understand that fvm::ddt(rho, h) is the representation of the time derivative, fvmDiv(phy,h) represent the convective term, but in this stage I am some confused about what is the meaning of the mvConvection>here, the next term is the diffusive term (fvm::laplacian(turbulence>alphaEff(), h)) here I am confused with the meaning of turbulence>alphaEff(). I will be a lot thankful if someone can explain me this. thanks for your help Best Regards 
You have to remember, this is still C++ code. They've overloaded the operators and created namespaces in an elegant way so it looks like you are typing in an equation, but it is still just C++, and sometimes the syntax gets in the way a little.
Code:
+ mvConvection>fvmDiv(phi, h) Code:
+ fvm::div(phi, h) Another reason for this may be because there are a lot of variables using a common convectionScheme... so rather than clutter up your fvSchemes file with entries for each variable, they define a common one, and only look that one up. Code:
turbulence>alphaEff() Hope that helps. 
Thanks for the reply David, was very helpful for me. Another question, the last term , DpDt is like an assignment ?
Best regards 
Quote:
Dan 
thanks for your reply Dan

Thanks Dan. Your article looks like a good read... relevant to my stuff, too.
Felipe, the last term DpDt isn't an assignment. It's the "equal to" operator. It behaves as an equals sign would in the equation you are creating. 
Quote:
Quote:
Thx, Alex EDIT: Just figured it out: DpDt is the total differentiation Dp = dp/dt + dp/dx Dx + dp/dy Dy + dp/dz Dz divided by Dt. With Dx/Dt = u, Dy/Dt = v, ... the above equation follows. My Question now is: Where is the implementation of this operator? I had no success by searching in the User Guide and neither was there a found in the Programming Guide. I also found a table with most of the operators (e.g. ddt(p)) but no word about DpDt. EDITē: Found the implementation in createFields.H. The "find" command under linux seems to be very helpful in such cases =) 
All times are GMT 4. The time now is 13:03. 