← Back to team overview

yade-users team mailing list archive

Re: [Question #701012]: DFN and Thermal engine

 

Question #701012 on Yade changed:
https://answers.launchpad.net/yade/+question/701012

Robert Caulk proposed the following answer:
Hey Luc,

>>How is DFNFlowEngine "linked" to FLowEngine exactly?

>From an architectural perspective, DFNFlow interacts with Yade the same
way as the PeriodicFlow, TwoPhaseFlow, UnsaturatedFlow, PartialSatClay
engines. FlowEngine is a "template" which users can essentially build
their own stuff on top of. This means you get all the underlying
functionality of the original FlowEngine, and the user only needs to add
their tweaks. For DFNFlow, that tweak is the "trickPermeability()"
function. But theoretically, the user can override any FlowEngine
function they want, while still having access to the entire FlowEngine
library and solver (e.g. PartialSatClayEngine overrides action()
entirely, but still uses the solver library etc.)

So in other words, when someone runs DFNFlowEngine in their python code,
the originally written FlowEngine::action() is running, and all
FlowEngine functionality is being executed, but when it arrives to
trickPermeability(), it is just using the DFNFlow defined
trickPermeability() instead of the original empty one.

ThermalEngine is *not* a template of FlowEngine. This is why all the
example scripts include both the FlowEngine and the ThermalEngine. But
ThermalEngine does interact quite a lot with FlowEngine (for heat
advection). That link is created here [1]. Judging by that line, you may
need to at least type "DFNFlowEngine" to make sure it is grabbing the
correct object. Here, I try to generalize it so that any named derived
FlowEngine will link [2]. Please test it at let me know if it works for
your purposes. Thank you.


[1]https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/pfv/Thermal.cpp#L45
[2]https://gitlab.com/yade-dev/trunk/-/merge_requests/844

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.