yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12921
[Branch ~yade-pkg/yade/git-trunk] Rev 3970: Introduce DryingEngine (two phase flow with convection in one phase)
------------------------------------------------------------
revno: 3970
committer: bchareyre <bruno.chareyre@xxxxxxxxxxxxxxx>
timestamp: Tue 2016-11-15 19:09:17 +0100
message:
Introduce DryingEngine (two phase flow with convection in one phase)
modified:
pkg/pfv/UnsaturatedEngine.cpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/pfv/UnsaturatedEngine.cpp'
--- pkg/pfv/UnsaturatedEngine.cpp 2016-11-02 10:40:55 +0000
+++ pkg/pfv/UnsaturatedEngine.cpp 2016-11-15 18:09:17 +0000
@@ -281,7 +281,7 @@
if ( cell->info().isTrapNW) {cell->info().p()=bndCondValue[2]+cell->info().trapCapP;}
}
if(solver->debugOut) {cout<<"----invasion1.update trapped W-phase/NW-phase Pressure----"<<endl;}
-
+
if(isCellLabelActivated) updateCellLabel();
if(solver->debugOut) {cout<<"----update cell labels----"<<endl;}
}
@@ -810,5 +810,62 @@
}
}
+//#########################################################
+// CONVECTIVE DRYING EXTENSION
+//#########################################################
+
+class PhaseCluster : public Serializable
+{
+ double totalCellVolume;
+ public :
+
+
+ virtual ~PhaseCluster();
+ vector<TwoPhaseFlowEngine::CellHandle> pores;
+ TwoPhaseFlowEngine::RTriangulation* tri;
+
+
+ YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(PhaseCluster,Serializable,"Preliminary.",
+ ((int,label,-1,,"Unique label of this cluster, should be reflected in pores of this cluster."))
+ ((double,volume,0,,"cumulated volume of all pores."))
+ ((double,entryPc,0,,"smallest entry capillary pressure."))
+ ((int,entryPore,0,,"the pore of the cluster incident to the throat with smallest entry Pc."))
+ ((double,interfacialArea,0,,"interfacial area of the cluster"))
+ ,,,
+ )
+};
+
+REGISTER_SERIALIZABLE(PhaseCluster);
+YADE_PLUGIN((PhaseCluster));
+
+PhaseCluster::~PhaseCluster(){}
+
+
+class DryingEngine : public UnsaturatedEngine
+{
+ public :
+ virtual ~DryingEngine();
+ vector<shared_ptr<PhaseCluster> > clusters;
+
+ boost::python::list pyClusters() {
+ boost::python::list ret;
+ for(vector<shared_ptr<PhaseCluster> >::iterator it=clusters.begin(); it!=clusters.end(); ++it) ret.append(*it);
+ return ret;}
+
+ YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(DryingEngine,UnsaturatedEngine,"Extended TwoPhaseFlowEngine for application to convective drying.",
+// ((shared_ptr<PhaseCluster> , cluster,new PhaseCluster,,"The list of clusters"))
+ ,,,
+ .def("getClusters",&DryingEngine::pyClusters/*,(boost::python::arg("folder")="./VTK")*/,"Save pressure field in vtk format. Specify a folder name for output.")
+ )
+ DECLARE_LOGGER;
+};
+
+DryingEngine::~DryingEngine(){};
+
+REGISTER_SERIALIZABLE(DryingEngine);
+YADE_PLUGIN((DryingEngine));
+
+
+
#endif //TWOPHASEFLOW
#endif //FLOW_ENGINE