|
[Sponsors] |
December 26, 2023, 11:26 |
Transferring Total 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. 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. Last edited by Dorian90; December 27, 2023 at 11:11. Reason: For clarity |
|
|
|
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 |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
How to use the CFX periodic interface | zhihuawan | CFX | 61 | January 15, 2018 17:20 |
Question about adaptive timestepping | Guille1811 | CFX | 25 | November 12, 2017 18:38 |