|
[Sponsors] |
Messing alphaEqn solver with meshPrimitivePtr->movePoints(newPointsRef, oldPointsRef) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 21, 2016, 16:36 |
Messing alphaEqn solver with meshPrimitivePtr->movePoints(newPointsRef, oldPointsRef)
|
#1 |
Member
Jean-Michel FONTAINE
Join Date: Aug 2009
Location: Orleans - France
Posts: 55
Rep Power: 17 |
Hi
I spent two days in vain to solve coding problem. My project is to modify interDyMFoam by adding a tightly coupled motion solver loop. For the mesh deformation, I try to use the method movePoints() from the class primitiveMesh Here is an extract of the code: Code:
// Calculates the candidatePoints from the initialPoints pointField initialPoints(mesh.points()); tmp<pointField> candidatePointsTmp(new pointField(mesh.points())); pointField& candidatePointsRef = candidatePointsTmp(); // Calculate the transformation septernion from the initial state septernion s ( centreOfMass - centreOfMass0, quaternion(orientationTensor & orientationTensor0.T()) ); forAll(candidatePointsRef, iPoint) { // Move non-stationary points if (scale_[iPoint] > SMALL) { // Use solid-body motion where scale_ = 1 if (scale_[iPoint] > 1 - SMALL) { candidatePointsRef[iPoint] = centreOfMass + (orientationTensor & orientationTensor0.T() & (initialPoints[iPoint] - centreOfMass0)); } // Slerp septernion interpolation else { septernion ss(slerp(septernion::I, s, scale_[iPoint])); candidatePointsRef[iPoint] = centreOfMass0 + ss.transform (initialPoints[iPoint] - centreOfMass0); } } } // Calculates the swept volume with the base class primitiveMesh pointField& initialPointsRef = initialPoints; primitiveMesh* meshPrimitivePtr = &mesh; // Following instruction causes the bug tmp<scalarField> sweptVolsTmp ( meshPrimitivePtr->movePoints ( candidatePointsRef, initialPointsRef ) ); But after that, the solver fails when solving "alpha1" : Code:
smoothSolver: Solving for alpha.water, Initial residual = nan, Final residual = nan, No Iterations 1000 Phase-1 volume fraction = -nan Min(alpha1) = -nan Max(alpha1) = -nan MULES: Correcting alpha.water Phase-1 volume fraction = -nan Min(alpha1) = -nan Max(alpha1) = -nan I can't figure out the problem : pointers ? tmp<field> ? Could anybody help out ? Greetings Jean-Michel |
|
Tags |
interdymfoam, primitivemesh, tmp<volscalarfield> |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fluent divergence for no reason | sufjanst | FLUENT | 2 | March 23, 2016 17:08 |
3d vof | Smaras | FLUENT | 2 | February 19, 2013 07:58 |
CFX 5.5 | Roued | CFX | 1 | October 2, 2001 17:49 |
Setting a B.C using UserFortran in 4.3 | tokai | CFX | 10 | July 17, 2001 17:25 |
Error during Solver | cfd guy | CFX | 4 | May 8, 2001 07:04 |