|
[Sponsors] |
Transferring Total Fluid stress of FS-Interface |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 27, 2023, 12:14 |
Transferring Total Fluid stress of FS-Interface
|
#1 |
New Member
Dorian
Join Date: Mar 2021
Posts: 10
Rep Power: 5 |
Hello Foamers,
I want to Total Fluid viscous (isotropic or hydro stress [-p*I] and anisotropic or deviatoric stress [sigmaFluid = 2*nuf*dev(symm(fvc::grad(U)))] on the Fluid-Solid Interface patches. I am not sure how to code the face normals and transfer the total fluid stress on the interfaces to account for the dynamic condition at FS-Interface. Fluid-Solid interface patches : patch consoleFluid (in Blue) ( (7 6 2 3) (0 1 5 4) ) patch outlet ( (1 5 6 2) ) patch consoleSolid (in Red) ( (8 9 21 20) (23 22 10 11) ) patch midNotch ( (9 10 22 21) ) So, here are my questions: 1. Since i will have 3 face normals ( 2 face normals from patch consoleFluid/consoleSolid) and one face normal (oulet/midNotch), I have tried to proceed as below but having some errors. // Solid Domain label consoleSolidPatchID = stressMesh.boundaryMesh().findPatchID("consoleSoli d"); label midNotchPatchID = stressMesh.boundaryMesh().findPatchID("midNotch"); // Fluid Domain label consoleFluidPatchID = mesh.boundaryMesh().findPatchID("consoleFluid"); label outletPatchID = mesh.boundaryMesh().findPatchID("outlet"); vectorField faceNormal1 = (stressMesh.Sf().boundaryField()[consoleSolidPatchID]) /(stressMesh.magSf().boundaryField()[consoleSolidPatchID]); vectorField faceNormal2 = (stressMesh.Sf().boundaryField()[midNotchPatchID]) /(stressMesh.magSf().boundaryField()[midNotchPatchID]); symmTensorField solidPatchTraction1 = interpolatorFluidSolid.faceInterpolate ( (sigmaFluid.boundaryField()[consoleFluidPatchID]) ); symmTensorField solidPatchTraction2 = interpolatorFluidSolid.faceInterpolate ( (sigmaFluid.boundaryField()[outletPatchID]) ); solidPatchTraction1 *= rho.value(); solidPatchTraction2 *= rho.value(); tForce.traction() = (solidPatchTraction1 & faceNorma11) + (solidPatchTraction2 & faceNormal2); My code crashes at this point with the following error : --> FOAM FATAL ERROR: given field does not correspond to patch. Patch size: 20 field size: 10 From function PatchToPatchInterpolation::faceInterpolate(const Field<Type> ff) in file /home/user/foam/foam-extend-5.0/src/foam/lnInclude/PatchToPatchInterpolate.C at line 128. Please how can I code to match the face normals to the patches so as to have the traction force on the patches right. b. Can I do this for the traction vector calculation? vectorField tractionVector1 = interpolatorFluidSolid.faceInterpolate ( (sigmaFluid.boundaryField()[consoleFluidPatchID] & faceNormal1) ); vectorField tractionVector2 = interpolatorFluidSolid.faceInterpolate ( (sigmaFluid.boundaryField()[outletPatchID] & faceNormal2) ); vector totalTractionForce = sum ( tractionVector1*rho.value() + tractionVector2*rho.value() ); Info << "Total traction force = " << totalTractionForce << endl; c. Please, where does the totalTractionForce is used in the solver? Because I can’t figure out. Is it in the tractionDisplacement BC code? If yes, how? Because I can’t see the linkage... d. Finally, when we have the code below: scalarField solidPatchPressure = interpolatorFluidSolid.faceInterpolate ( p.boundaryField()[fluidPatchID] ); solidPatchPressure *= rhoFluid.value(); tForce.pressure() = solidPatchPressure; vector totalPressureForce = sum ( p.boundaryField()[fluidPatchID]*rhoFluid.value()* (mesh.Sf().boundaryField()[fluidPatchID])/(mesh.magSf().boundaryField()[fluidPatchID]) ); Info << "Total pressure force = " << totalPressureForce << endl; where does the totalPressureForce is used in the solver? Because I can’t figure out. Is it in the tractionDisplacement BC code? If yes, how? Because I can’t see the linkage... Thank You. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculating source term total cell-zone volume parallel computation | RobV | Fluent UDF and Scheme Programming | 2 | May 30, 2022 04:46 |
use the message in macro DEFINE_PROFILE with parallel processor | alireza_T | Fluent UDF and Scheme Programming | 3 | May 11, 2022 03:08 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Setting rotating frame of referece. | RPFigueiredo | CFX | 3 | October 28, 2014 05:59 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |