
[Sponsors] 
December 30, 2014, 07:11 
Understanding about updateCoeffs() in solidDisplacementFoam

#1 
Member
Anil Kunwar
Join Date: Jun 2013
Posts: 55
Rep Power: 5 
Sponsored Links
In solidDisplacementFoam solver,at tractionDisplacementFvPatchVectorField.C, there is a following piece of code for updateCoeffs(). Code:
void tractionDisplacementFvPatchVectorField::updateCoeffs() { ... gradient() = ( (traction_  pressure_*n)/rho + twoMuLambda*fvPatchField<vector>::snGrad()  (n & sigmaD) )/twoMuLambda; ... fixedGradientFvPatchVectorField::updateCoeffs(); } Code:
void tractionDisplacementFvPatchVectorField::updateCoeffs() { ... gradient() = ( (traction_  pressure_*n)/rho.value()  (n & (mu.value()*gradU.T()  (mu + lambda).value()*gradU))  n*tr(gradU)*lambda.value() )/(2.0*mu + lambda).value(); fixedGradientFvPatchVectorField::updateCoeffs(); } 2. Similarly, the meaning of gradU.T(). 3. Do they convert a scalar to a matrix of given size? 4. Is there a layman way to understand the process of coefficients being updated? Yours Anil Kunwar 

Sponsored Links 
December 30, 2014, 08:31 

#2  
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,978
Blog Entries: 39
Rep Power: 108 
Greetings Anil Kunwar,
I'll only be able to answer a few of your questions: "mu" is a dimensioned scalar, the method "value()" gets access to only the value itself. Otherwise, the operations would try to do the necessary mathematics including units. "T()"  Transposes the vector/matrix. For more details: http://openfoamwiki.net/index.php/Op...s_Guide_Errata Uhm... the calculations are automatically made by taking into account all values in the patch or field, depending on the context. This is why there isn't a "for" loop in that code that goes along all faces of a patch or all the cells of a mesh. Quote:
Best regards, Bruno 

December 30, 2014, 10:38 

#3 
Member
Anil Kunwar
Join Date: Jun 2013
Posts: 55
Rep Power: 5 
Hi Bruno,
Thank you very much for making me understand more about OpenFOAM code structure. I studied about updateCoeffs() in this thread http://www.cfdonline.com/Forums/ope...msolvers.html Some of my understandings are:
Still, there are many things I need to know further, in order to conceptualize how the coefficients are updated [updateCoeffs()] and evaluated [evaluate()] at the boundaries. Where is the source location of fixedGradientFvPatchVectorField.C? Thank you. Yours Anil Kunwar Last edited by Annier; December 30, 2014 at 12:02. Reason: rectified the link 

December 30, 2014, 11:55 

#4  
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,978
Blog Entries: 39
Rep Power: 108 
Quick answer:


January 1, 2015, 07:23 

#5 
Member
Anil Kunwar
Join Date: Jun 2013
Posts: 55
Rep Power: 5 
Hi Bruno,
Thank you very much. I will try to learn the things. Yours Anil Kunwar Last edited by Annier; January 1, 2015 at 10:56. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
TimeVaryingMappedFixedValue  irishdave  OpenFOAM Running, Solving & CFD  29  May 3, 2017 08:59 
Purposes of updateCoeffs, initEvaluate and evaluate....?  philippose  OpenFOAM Programming & Development  7  August 3, 2016 10:00 
updateCoeffs() and evaluate()  lixx  OpenFOAM Programming & Development  4  May 3, 2015 13:11 
Coupling of OpenFOAM solvers  Annier  OpenFOAM Running, Solving & CFD  1  January 5, 2015 11:50 
TimeVaryingMappedFixedValue for Direct Numerical Simulation inlet  johndeas  OpenFOAM  5  May 21, 2014 07:11 
Sponsored Links 