|
[Sponsors] |
Understanding about updateCoeffs() in solidDisplacementFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 30, 2014, 07:11 |
Understanding about updateCoeffs() in solidDisplacementFoam
|
#1 |
Member
Anil Kunwar
Join Date: Jun 2013
Posts: 64
Rep Power: 12 |
Hi,
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 |
|
December 30, 2014, 08:31 |
|
#2 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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: 64
Rep Power: 12 |
Hi Bruno,
Thank you very much for making me understand more about OpenFOAM code structure. I studied about updateCoeffs() in this thread http://www.cfd-online.com/Forums/ope...m-solvers.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 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answer:
|
||
January 1, 2015, 07:23 |
|
#5 |
Member
Anil Kunwar
Join Date: Jun 2013
Posts: 64
Rep Power: 12 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TimeVaryingMappedFixedValue | irishdave | OpenFOAM Running, Solving & CFD | 32 | June 16, 2021 07:55 |
Purposes of updateCoeffs, initEvaluate and evaluate....? | philippose | OpenFOAM Programming & Development | 9 | September 29, 2020 06:09 |
updateCoeffs() and evaluate() | lixx | OpenFOAM Programming & Development | 11 | August 12, 2020 16:41 |
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 08:11 |